-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconquest_game_invented_by_me.py
113 lines (99 loc) · 3.95 KB
/
conquest_game_invented_by_me.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
import random
countries = ['Romania', 'Serbia', 'Macedonia', 'Greece', 'Turkey', 'Albania', 'Hungary', 'Austria', 'Germany', 'France']
conquest_country = []
gold_player = 0
power_player = 0
gold_computer = 0
power_computer = 0
next_will_be = ''
who_s_first = ['player', 'computer']
first_will_be = random.choice(who_s_first)
your_name = input('What is your name?\n')
print('***********************************************************************')
print(f'* Hello, {your_name}. Welcome to the game "Conquest"! I wish you good luck! *')
print('***********************************************************************\n')
print(f'{first_will_be} will start to play first.')
for _ in range(0, 30):
conquest = random.choice(countries)
country = conquest
if country not in conquest_country:
conquest_country.append(conquest)
else:
continue
if next_will_be:
print(f'Is your turn {next_will_be}!')
print(f'You will fight for {country}.\n')
if country in ['Romania', 'Serbia', 'Macedonia', 'Albania']:
if first_will_be == 'computer':
gold_computer += 100
power_computer += 1000
elif first_will_be == 'player':
gold_player += 100
power_player += 1000
fight = input('Press "f" to fight: ')
if next_will_be == 'computer':
gold_computer += 100
power_computer += 1000
elif next_will_be == 'player':
gold_player += 100
power_player += 1000
print('Press "f" to fight: ')
fight = input()
elif country in ['Greece', 'Turkey', 'Hungary', 'Austria']:
if first_will_be == 'computer':
gold_computer += 150
power_computer += 1500
elif first_will_be == 'player':
gold_player += 150
power_player += 1500
fight = input('Press "f" to fight: ')
if next_will_be == 'computer':
gold_computer += 150
power_computer += 1500
elif next_will_be == 'player':
gold_player += 150
power_player += 1500
fight = input('Press "f" to fight: ')
elif country in ['Germany', 'France']:
if first_will_be == 'computer':
gold_computer += 200
power_computer += 2000
elif first_will_be == 'player':
gold_player += 200
power_player += 2000
fight = input('Press "f" to fight: ')
if next_will_be == 'computer':
gold_computer += 200
power_computer += 2000
elif next_will_be == 'player':
gold_player += 200
power_player += 2000
fight = input('Press "f" to fight: ')
if next_will_be == 'computer':
next_will_be = 'player'
else:
next_will_be = 'computer'
if first_will_be == 'computer':
next_will_be = 'player'
first_will_be = ''
elif first_will_be == 'player':
next_will_be = 'computer'
first_will_be = ''
print('Now you will see the RESULT:')
print('----------------------------')
print(f'Player power is {power_player} and gain {gold_player} gold.')
print(f'Computer power is {power_computer} and gain {gold_computer} gold.')
if gold_player > gold_computer:
gold_player += gold_computer
print('Player will use the all gold for refreshing Bulgarian economy.')
print(f'Total gold: {gold_player}.')
elif gold_computer > gold_player:
print('Computer doesn`t need the gold. Will give it all for charity!')
elif gold_player == gold_computer:
print(f'Player and computer will give {gold_player + gold_computer} gold for charity.')
if power_player > power_computer:
print(f'Player you win the game and join all the territories of the countries to Bulgaria!')
elif power_computer > power_player:
print(f'Computer wins this game. But one game over doesn`t mean the war is won!')
elif power_player == power_computer:
print('You will need to fight again!!!')