Work in progress on Ada version...
This commit is contained in:
parent
0652b07981
commit
7a91d322cf
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1,3 @@
|
||||
xerbia
|
||||
xerbia.o
|
||||
xerbia.ali
|
||||
|
66
xerbia.adb
Normal file
66
xerbia.adb
Normal file
@ -0,0 +1,66 @@
|
||||
with ada.text_io;
|
||||
use ada.text_io;
|
||||
|
||||
procedure xerbia is
|
||||
|
||||
type resource_type is (
|
||||
wheat, gold, wood, stone
|
||||
);
|
||||
|
||||
type construction_type is (
|
||||
granary, mine, storehouse, quarry
|
||||
);
|
||||
|
||||
type reply_type is (
|
||||
quit, help, report, status, build, train, trade, plant,
|
||||
turn
|
||||
);
|
||||
|
||||
grey : constant string := ascii.esc & "[1;30m";
|
||||
red : constant string := ascii.esc & "[1;31m";
|
||||
green : constant string := ascii.esc & "[1;32m";
|
||||
yellow : constant string := ascii.esc & "[1;33m";
|
||||
blue : constant string := ascii.esc & "[1;34m";
|
||||
pink : constant string := ascii.esc & "[1;35m";
|
||||
cyan : constant string := ascii.esc & "[1;36m";
|
||||
white : constant string := ascii.esc & "[1;37m";
|
||||
cancel : constant string := ascii.esc & "[0m";
|
||||
|
||||
population : natural := 0;
|
||||
reputation : integer := 0;
|
||||
migration : integer := 0;
|
||||
|
||||
resource : array (resource_type) of integer := (others => 0);
|
||||
construction : array (construction_type) of natural := (others => 0);
|
||||
|
||||
reply_text : constant array (reply_type) of access string := (
|
||||
new string'("Quit game."),
|
||||
new string'("Print reply strings and their explanation, like this one."),
|
||||
new string'("Request a report from your court advisors about the state of your fortress."),
|
||||
new string'("Request a meeting with lords and merchants about affairs in your fiefdom."),
|
||||
new string'("Propose what kind of construction should be built this month to your architect."),
|
||||
new string'("Spend more time training with your warriors this entire month."),
|
||||
new string'("Discuss what goods should be sold or bought this month with merchant guild."),
|
||||
new string'("Order what kind of plants should your peasants harvest this month."),
|
||||
new string'("Submit your monthly strategy to the council and wait until next month.")
|
||||
);
|
||||
|
||||
construction_price : array (construction_type, resource_type) of natural := (
|
||||
(0, 10, 60, 30),
|
||||
(0, 120, 60, 10),
|
||||
(0, 30, 10, 60),
|
||||
(0, 60, 30, 10)
|
||||
);
|
||||
|
||||
procedure separator is
|
||||
begin
|
||||
put_line (grey & "------------------------------------------------------------------------------------------" & cancel);
|
||||
end separator;
|
||||
|
||||
begin
|
||||
|
||||
separator;
|
||||
separator;
|
||||
separator;
|
||||
|
||||
end xerbia;
|
Loading…
Reference in New Issue
Block a user