This commit is contained in:
Jocelyn Fiat
2024-06-17 09:09:33 +02:00
commit 6dde6425c2
560 changed files with 81728 additions and 0 deletions

View File

@@ -0,0 +1,70 @@
note
description: "[
Describes this particular location in VITP
]"
author: "Jimmy J. Johnson"
class
ALEUTIAN_ISLANDS
inherit
SEA_AREA
redefine
make
end
create
make
feature {NONE} -- Initialization
make (a_game: like game)
-- Initialize Current
do
Precursor (a_game)
nationality := {NATIONALITY_CONSTANTS}.nobody
defining_position := [570, 80]
end
feature -- Access
name: STRING_8 = "Aleutian Islands"
-- The displayed name for this widget
defining_position: TUPLE [x, y: INTEGER_32]
-- The x- and y-coordinate (in millimeters) of Current's
-- position relative to the top-left corner of the board.
allied_poc: INTEGER = 0
-- The number of points gained by the Allied player if he
-- controls this area at the end of a turn
japanese_poc: INTEGER = 1
-- The number of points gained by the Japanese player if he
-- controls this area at the end of a turn
adjoining_ports: LINEAR [PORT]
-- All the ports that adjoin this sea area
local
p: LINKED_SET [PORT]
once
create p.make
p.extend (game.attu)
p.extend (game.dutch_harbor)
Result := p.linear_representation
end
adjacent_sea_areas: LINEAR [SEA_AREA]
-- All the sea areas which touch this one
local
s: LINKED_SET [SEA_AREA]
once
create s.make
s.extend (game.japanese_islands)
s.extend (game.central_pacific_ocean)
s.extend (game.north_pacific_ocean)
Result := s.linear_representation
end
end

View File

@@ -0,0 +1,69 @@
note
description: "[
Describes this particular location in VITP
]"
author: "Jimmy J. Johnson"
class
BAY_OF_BENGAL
inherit
SEA_AREA
redefine
make
end
create
make
feature {NONE} -- Initialization
make (a_game: like game)
-- Initialize Current
do
Precursor (a_game)
nationality := {NATIONALITY_CONSTANTS}.us
defining_position := [30, 330]
end
feature -- Access
name: STRING_8 = "Bay of Bengal"
-- The displayed name for this widget
defining_position: TUPLE [x, y: INTEGER_32]
-- The x- and y-coordinate (in millimeters) of Current's
-- position relative to the top-left corner of the board.
allied_poc: INTEGER = 1
-- The number of points gained by the Allied player if he
-- controls this area at the end of a turn
japanese_poc: INTEGER = 2
-- The number of points gained by the Japanese player if he
-- controls this area at the end of a turn
adjoining_ports: LINEAR [PORT]
-- All the ports that adjoin this sea area
local
p: LINKED_SET [PORT]
once
create p.make
p.extend (game.ceylon)
p.extend (game.andaman_islands)
Result := p.linear_representation
end
adjacent_sea_areas: LINEAR [SEA_AREA]
-- All the sea areas which touch this one
local
s: LINKED_SET [SEA_AREA]
once
create s.make
s.extend (game.indonesia)
s.extend (game.indian_ocean)
Result := s.linear_representation
end
end

View File

@@ -0,0 +1,72 @@
note
description: "[
Describes this particular location in VITP
]"
author: "Jimmy J. Johnson"
class
CENTRAL_PACIFIC_OCEAN
inherit
SEA_AREA
redefine
make
end
create
make
feature {NONE} -- Initialization
make (a_game: like game)
-- Initialize Current
do
Precursor (a_game)
nationality := {NATIONALITY_CONSTANTS}.us
defining_position := [540, 180]
end
feature -- Access
name: STRING_8 = "Central Pacific Ocean"
-- The displayed name for this widget
defining_position: TUPLE [x, y: INTEGER_32]
-- The x- and y-coordinate (in millimeters) of Current's
-- position relative to the top-left corner of the board.
allied_poc: INTEGER = 0
-- The number of points gained by the Allied player if he
-- controls this area at the end of a turn
japanese_poc: INTEGER = 1
-- The number of points gained by the Japanese player if he
-- controls this area at the end of a turn
adjoining_ports: LINEAR [PORT]
-- All the ports that adjoin this sea area
local
p: LINKED_SET [PORT]
once
create p.make
p.extend (game.midway)
Result := p.linear_representation
end
adjacent_sea_areas: LINEAR [SEA_AREA]
-- All the sea areas which touch this one
local
s: LINKED_SET [SEA_AREA]
once
create s.make
s.extend (game.aleutian_islands)
s.extend (game.hawaiian_islands)
s.extend (game.japanese_islands)
s.extend (game.marianas_islands)
s.extend (game.marshall_islands)
s.extend (game.north_pacific_ocean)
Result := s.linear_representation
end
end

View File

@@ -0,0 +1,72 @@
note
description: "[
Describes this particular location in VITP
]"
author: "Jimmy J. Johnson"
class
CORAL_SEA
inherit
SEA_AREA
redefine
make
end
create
make
feature {NONE} -- Initialization
make (a_game: like game)
-- Initialize Current
do
Precursor (a_game)
nationality := {NATIONALITY_CONSTANTS}.us
defining_position := [380, 510]
end
feature -- Access
name: STRING_8 = "Coral Sea"
-- The displayed name for this widget
defining_position: TUPLE [x, y: INTEGER_32]
-- The x- and y-coordinate (in millimeters) of Current's
-- position relative to the top-left corner of the board.
allied_poc: INTEGER = 2
-- The number of points gained by the Allied player if he
-- controls this area at the end of a turn
japanese_poc: INTEGER = 2
-- The number of points gained by the Japanese player if he
-- controls this area at the end of a turn
adjoining_ports: LINEAR [PORT]
-- All the ports that adjoin this sea area
local
p: LINKED_SET [PORT]
once
create p.make
p.extend (game.australia)
p.extend (game.port_moresby)
p.extend (game.guadalcanal)
p.extend (game.new_hebrides)
Result := p.linear_representation
end
adjacent_sea_areas: LINEAR [SEA_AREA]
-- All the sea areas which touch this one
local
s: LINKED_SET [SEA_AREA]
once
create s.make
s.extend (game.indian_ocean)
s.extend (game.south_pacific_ocean)
s.extend (game.us_mandate)
Result := s.linear_representation
end
end

View File

@@ -0,0 +1,71 @@
note
description: "[
Describes this particular location in VITP
]"
author: "Jimmy J. Johnson"
class
HAWAIIAN_ISLANDS
inherit
SEA_AREA
redefine
make
end
create
make
feature {NONE} -- Initialization
make (a_game: like game)
-- Initialize Current
do
Precursor (a_game)
nationality := {NATIONALITY_CONSTANTS}.us
defining_position := [660, 400]
end
feature -- Access
name: STRING_8 = "Hawaiian Islands"
-- The displayed name for this widget
defining_position: TUPLE [x, y: INTEGER_32]
-- The x- and y-coordinate (in millimeters) of Current's
-- position relative to the top-left corner of the board.
allied_poc: INTEGER = 3
-- The number of points gained by the Allied player if he
-- controls this area at the end of a turn
japanese_poc: INTEGER = 2
-- The number of points gained by the Japanese player if he
-- controls this area at the end of a turn
adjoining_ports: LINEAR [PORT]
-- All the ports that adjoin this sea area
local
p: LINKED_SET [PORT]
once
create p.make
p.extend (game.johnston_island)
p.extend (game.pearl_harbor)
Result := p.linear_representation
end
adjacent_sea_areas: LINEAR [SEA_AREA]
-- All the sea areas which touch this one
local
s: LINKED_SET [SEA_AREA]
once
create s.make
s.extend (game.central_pacific_ocean)
s.extend (game.marshall_islands)
s.extend (game.north_pacific_ocean)
s.extend (game.us_mandate)
Result := s.linear_representation
end
end

View File

@@ -0,0 +1,70 @@
note
description: "[
Describes this particular location in VITP
]"
author: "Jimmy J. Johnson"
class
INDIAN_OCEAN
inherit
SEA_AREA
redefine
make
end
create
make
feature {NONE} -- Initialization
make (a_game: like game)
-- Initialize Current
do
Precursor (a_game)
nationality := {NATIONALITY_CONSTANTS}.us
defining_position := [70, 440]
end
feature -- Access
name: STRING_8 = "Indian Ocean"
-- The displayed name for this widget
defining_position: TUPLE [x, y: INTEGER_32]
-- The x- and y-coordinate (in millimeters) of Current's
-- position relative to the top-left corner of the board.
allied_poc: INTEGER = 0
-- The number of points gained by the Allied player if he
-- controls this area at the end of a turn
japanese_poc: INTEGER = 2
-- The number of points gained by the Japanese player if he
-- controls this area at the end of a turn
adjoining_ports: LINEAR [PORT]
-- All the ports that adjoin this sea area
local
p: LINKED_SET [PORT]
once
create p.make
p.extend (game.australia)
p.extend (game.port_moresby)
Result := p.linear_representation
end
adjacent_sea_areas: LINEAR [SEA_AREA]
-- All the sea areas which touch this one
local
s: LINKED_SET [SEA_AREA]
once
create s.make
s.extend (game.bay_of_bengal)
s.extend (game.indonesia)
s.extend (game.coral_sea)
Result := s.linear_representation
end
end

View File

@@ -0,0 +1,74 @@
note
description: "[
Describes this particular location in VITP
]"
author: "Jimmy J. Johnson"
class
INDONESIA
inherit
SEA_AREA
redefine
make
end
create
make
feature {NONE} -- Initialization
make (a_game: like game)
-- Initialize Current
do
Precursor (a_game)
nationality := {NATIONALITY_CONSTANTS}.us
defining_position := [150, 300]
end
feature -- Access
name: STRING_8 = "Indonesia"
-- The displayed name for this widget
defining_position: TUPLE [x, y: INTEGER_32]
-- The x- and y-coordinate (in millimeters) of Current's
-- position relative to the top-left corner of the board.
allied_poc: INTEGER = 1
-- The number of points gained by the Allied player if he
-- controls this area at the end of a turn
japanese_poc: INTEGER = 3
-- The number of points gained by the Japanese player if he
-- controls this area at the end of a turn
adjoining_ports: LINEAR [PORT]
-- All the ports that adjoin this sea area
local
p: LINKED_SET [PORT]
once
create p.make
p.extend (game.saigon)
p.extend (game.singapore)
p.extend (game.philippines)
p.extend (game.lae)
Result := p.linear_representation
end
adjacent_sea_areas: LINEAR [SEA_AREA]
-- All the sea areas which touch this one
local
s: LINKED_SET [SEA_AREA]
once
create s.make
s.extend (game.bay_of_bengal)
s.extend (game.indonesia)
s.extend (game.japanese_islands)
s.extend (game.marshall_islands)
s.extend (game.south_pacific_ocean)
Result := s.linear_representation
end
end

View File

@@ -0,0 +1,71 @@
note
description: "[
Describes this particular location in VITP
]"
author: "Jimmy J. Johnson"
class
JAPANESE_ISLANDS
inherit
SEA_AREA
redefine
make
end
create
make
feature {NONE} -- Initialization
make (a_game: like game)
-- Initialize Current
do
Precursor (a_game)
nationality := {NATIONALITY_CONSTANTS}.japanese
defining_position := [420, 110]
end
feature -- Access
name: STRING_8 = "Japanese Islands"
-- The displayed name for this widget
defining_position: TUPLE [x, y: INTEGER_32]
-- The x- and y-coordinate (in millimeters) of Current's
-- position relative to the top-left corner of the board.
allied_poc: INTEGER = 3
-- The number of points gained by the Allied player if he
-- controls this area at the end of a turn
japanese_poc: INTEGER = 3
-- The number of points gained by the Japanese player if he
-- controls this area at the end of a turn
adjoining_ports: LINEAR [PORT]
-- All the ports that adjoin this sea area
local
p: LINKED_SET [PORT]
once
create p.make
p.extend (game.yokosuka_navy_yard)
p.extend (game.okinawa)
Result := p.linear_representation
end
adjacent_sea_areas: LINEAR [SEA_AREA]
-- All the sea areas which touch this one
local
s: LINKED_SET [SEA_AREA]
once
create s.make
s.extend (game.aleutian_islands)
s.extend (game.central_pacific_ocean)
s.extend (game.marianas_islands)
s.extend (game.indonesia)
Result := s.linear_representation
end
end

View File

@@ -0,0 +1,73 @@
note
description: "[
Describes this particular location in VITP
]"
author: "Jimmy J. Johnson"
class
MARIANAS_ISLANDS
inherit
SEA_AREA
redefine
make
end
create
make
feature {NONE} -- Initialization
make (a_game: like game)
-- Initialize Current
do
Precursor (a_game)
nationality := {NATIONALITY_CONSTANTS}.japanese
defining_position := [310, 250]
end
feature -- Access
name: STRING_8 = "Marianas Islands"
-- The displayed name for this widget
defining_position: TUPLE [x, y: INTEGER_32]
-- The x- and y-coordinate (in millimeters) of Current's
-- position relative to the top-left corner of the board.
allied_poc: INTEGER = 1
-- The number of points gained by the Allied player if he
-- controls this area at the end of a turn
japanese_poc: INTEGER = 2
-- The number of points gained by the Japanese player if he
-- controls this area at the end of a turn
adjoining_ports: LINEAR [PORT]
-- All the ports that adjoin this sea area
local
p: LINKED_SET [PORT]
once
create p.make
p.extend (game.philippines)
p.extend (game.saipan)
p.extend (game.truk)
Result := p.linear_representation
end
adjacent_sea_areas: LINEAR [SEA_AREA]
-- All the sea areas which touch this one
local
s: LINKED_SET [SEA_AREA]
once
create s.make
s.extend (game.central_pacific_ocean)
s.extend (game.indonesia)
s.extend (game.japanese_islands)
s.extend (game.marshall_islands)
s.extend (game.south_pacific_ocean)
Result := s.linear_representation
end
end

View File

@@ -0,0 +1,73 @@
note
description: "[
Describes this particular location in VITP
]"
author: "Jimmy J. Johnson"
class
MARSHALL_ISLANDS
inherit
SEA_AREA
redefine
make
end
create
make
feature {NONE} -- Initialization
make (a_game: like game)
-- Initialize Current
do
Precursor (a_game)
nationality := {NATIONALITY_CONSTANTS}.japanese
defining_position := [490, 320]
end
feature -- Access
name: STRING_8 = "Marshall Islands"
-- The displayed name for this widget
defining_position: TUPLE [x, y: INTEGER_32]
-- The x- and y-coordinate (in millimeters) of Current's
-- position relative to the top-left corner of the board.
allied_poc: INTEGER = 1
-- The number of points gained by the Allied player if he
-- controls this area at the end of a turn
japanese_poc: INTEGER = 1
-- The number of points gained by the Japanese player if he
-- controls this area at the end of a turn
adjoining_ports: LINEAR [PORT]
-- All the ports that adjoin this sea area
local
p: LINKED_SET [PORT]
once
create p.make
p.extend (game.kwajalein)
p.extend (game.maloelap)
p.extend (game.truk)
Result := p.linear_representation
end
adjacent_sea_areas: LINEAR [SEA_AREA]
-- All the sea areas which touch this one
local
s: LINKED_SET [SEA_AREA]
once
create s.make
s.extend (game.central_pacific_ocean)
s.extend (game.hawaiian_islands)
s.extend (game.marianas_islands)
s.extend (game.south_pacific_ocean)
s.extend (game.us_mandate)
Result := s.linear_representation
end
end

View File

@@ -0,0 +1,69 @@
note
description: "[
Describes this particular location in VITP
]"
author: "Jimmy J. Johnson"
class
NORTH_PACIFIC_OCEAN
inherit
SEA_AREA
redefine
make
end
create
make
feature {NONE} -- Initialization
make (a_game: like game)
-- Initialize Current
do
Precursor (a_game)
nationality := {NATIONALITY_CONSTANTS}.nobody
defining_position := [670, 150]
end
feature -- Access
name: STRING_8 = "North Pacific Ocean"
-- The displayed name for this widget
defining_position: TUPLE [x, y: INTEGER_32]
-- The x- and y-coordinate (in millimeters) of Current's
-- position relative to the top-left corner of the board.
allied_poc: INTEGER = 1
-- The number of points gained by the Allied player if he
-- controls this area at the end of a turn
japanese_poc: INTEGER = 1
-- The number of points gained by the Japanese player if he
-- controls this area at the end of a turn
adjoining_ports: LINEAR [PORT]
-- All the ports that adjoin this sea area
local
p: LINKED_SET [PORT]
once
create p.make
p.extend (game.dutch_harbor)
Result := p.linear_representation
end
adjacent_sea_areas: LINEAR [SEA_AREA]
-- All the sea areas which touch this one
local
s: LINKED_SET [SEA_AREA]
once
create s.make
s.extend (game.aleutian_islands)
s.extend (game.central_pacific_ocean)
s.extend (game.hawaiian_islands)
Result := s.linear_representation
end
end

View File

@@ -0,0 +1,52 @@
note
description: "[
Represents a sea area for the VITP game.
]"
author: "Jimmy J. Johnson"
deferred class
SEA_AREA
inherit
LOCATION
feature -- Access
POC: INTEGER
-- The number of points awarded at end of turn to player
-- that controls this area.
do
if is_japanese then
Result := japanese_poc
else
Result := allied_poc
end
end
japanese_poc: INTEGER
-- The number of points gained by the Japanese player if he
-- controls this area at the end of a turn
deferred
end
allied_poc: INTEGER
-- The number of points gained by the Allied player if he
-- controls this area at the end of a turn
deferred
end
adjoining_ports: LINEAR [PORT]
-- All the ports that adjoin this sea area
deferred
end
feature -- Status report
is_contested: BOOLEAN
-- Does Current contain Japanese and Allied units?
do
Result := japanese_units.count > 0 and allied_units.count > 0
end
end

View File

@@ -0,0 +1,73 @@
note
description: "[
Describes this particular location in VITP
]"
author: "Jimmy J. Johnson"
class
SOUTH_PACIFIC_OCEAN
inherit
SEA_AREA
redefine
make
end
create
make
feature {NONE} -- Initialization
make (a_game: like game)
-- Initialize Current
do
Precursor (a_game)
nationality := {NATIONALITY_CONSTANTS}.us
defining_position := [390, 390]
end
feature -- Access
name: STRING_8 = "South Pacific Ocean"
-- The displayed name for this widget
defining_position: TUPLE [x, y: INTEGER_32]
-- The x- and y-coordinate (in millimeters) of Current's
-- position relative to the top-left corner of the board.
allied_poc: INTEGER = 1
-- The number of points gained by the Allied player if he
-- controls this area at the end of a turn
japanese_poc: INTEGER = 2
-- The number of points gained by the Japanese player if he
-- controls this area at the end of a turn
adjoining_ports: LINEAR [PORT]
-- All the ports that adjoin this sea area
local
p: LINKED_SET [PORT]
once
create p.make
p.extend (game.guadalcanal)
p.extend (game.lae)
p.extend (game.truk)
Result := p.linear_representation
end
adjacent_sea_areas: LINEAR [SEA_AREA]
-- All the sea areas which touch this one
local
s: LINKED_SET [SEA_AREA]
once
create s.make
s.extend (game.coral_sea)
s.extend (game.indonesia)
s.extend (game.marianas_islands)
s.extend (game.marshall_islands)
s.extend (game.us_mandate)
Result := s.linear_representation
end
end

View File

@@ -0,0 +1,71 @@
note
description: "[
Describes this particular location in VITP
]"
author: "Jimmy J. Johnson"
class
US_MANDATE
inherit
SEA_AREA
redefine
make
end
create
make
feature {NONE} -- Initialization
make (a_game: like game)
-- Initialize Current
do
Precursor (a_game)
nationality := {NATIONALITY_CONSTANTS}.us
defining_position := [570, 460]
end
feature -- Access
name: STRING_8 = "US Mandate"
-- The displayed name for this widget
defining_position: TUPLE [x, y: INTEGER_32]
-- The x- and y-coordinate (in millimeters) of Current's
-- position relative to the top-left corner of the board.
allied_poc: INTEGER = 2
-- The number of points gained by the Allied player if he
-- controls this area at the end of a turn
japanese_poc: INTEGER = 2
-- The number of points gained by the Japanese player if he
-- controls this area at the end of a turn
adjoining_ports: LINEAR [PORT]
-- All the ports that adjoin this sea area
local
p: LINKED_SET [PORT]
once
create p.make
p.extend (game.new_hebrides)
p.extend (game.samoa)
Result := p.linear_representation
end
adjacent_sea_areas: LINEAR [SEA_AREA]
-- All the sea areas which touch this one
local
s: LINKED_SET [SEA_AREA]
once
create s.make
s.extend (game.coral_sea)
s.extend (game.hawaiian_islands)
s.extend (game.marshall_islands)
s.extend (game.south_pacific_ocean)
Result := s.linear_representation
end
end