Swap tower and castle positions.

This commit is contained in:
yukirij 2024-08-17 22:10:43 -07:00
parent 3d8d68e0c5
commit a8393e0df9
4 changed files with 15 additions and 8 deletions

View File

@ -72,11 +72,11 @@ impl Board {
(Piece::new(PIECE_KNIGHT, PLAYER_DAWN), Hex::from_hex(1, 0)),
(Piece::new(PIECE_KNIGHT, PLAYER_DAWN), Hex::from_hex(7, 3)),
(Piece::new(PIECE_CASTLE, PLAYER_DAWN), Hex::from_hex(2, 0)),
(Piece::new(PIECE_CASTLE, PLAYER_DAWN), Hex::from_hex(6, 2)),
(Piece::new(PIECE_TOWER, PLAYER_DAWN), Hex::from_hex(2, 0)),
(Piece::new(PIECE_TOWER, PLAYER_DAWN), Hex::from_hex(6, 2)),
(Piece::new(PIECE_TOWER, PLAYER_DAWN), Hex::from_hex(3, 0)),
(Piece::new(PIECE_TOWER, PLAYER_DAWN), Hex::from_hex(5, 1)),
(Piece::new(PIECE_CASTLE, PLAYER_DAWN), Hex::from_hex(3, 0)),
(Piece::new(PIECE_CASTLE, PLAYER_DAWN), Hex::from_hex(5, 1)),
(Piece::new(PIECE_DRAGON, PLAYER_DAWN), Hex::from_hex(4, 2)),
(Piece::new(PIECE_BEHEMOTH, PLAYER_DAWN), Hex::from_hex(4, 1)),

View File

@ -31,11 +31,11 @@ GAME.Board = class {
{ piece:GAME.Const.PieceId.Knight, hex:new MATH.Vec2(1, 0) },
{ piece:GAME.Const.PieceId.Knight, hex:new MATH.Vec2(7, 3) },
{ piece:GAME.Const.PieceId.Castle, hex:new MATH.Vec2(2, 0) },
{ piece:GAME.Const.PieceId.Castle, hex:new MATH.Vec2(6, 2) },
{ piece:GAME.Const.PieceId.Tower, hex:new MATH.Vec2(2, 0) },
{ piece:GAME.Const.PieceId.Tower, hex:new MATH.Vec2(6, 2) },
{ piece:GAME.Const.PieceId.Tower, hex:new MATH.Vec2(3, 0) },
{ piece:GAME.Const.PieceId.Tower, hex:new MATH.Vec2(5, 1) },
{ piece:GAME.Const.PieceId.Castle, hex:new MATH.Vec2(3, 0) },
{ piece:GAME.Const.PieceId.Castle, hex:new MATH.Vec2(5, 1) },
{ piece:GAME.Const.PieceId.Dragon, hex:new MATH.Vec2(4, 2) },
{ piece:GAME.Const.PieceId.Behemoth, hex:new MATH.Vec2(4, 1) },

View File

@ -759,6 +759,12 @@ const INTERFACE = {
}
},
reset() {
GAME.init();
INTERFACE_DATA.player = 0;
INTERFACE_DATA.rotate = 0;
},
message(code, data) {
switch(code) {
case OpCode.GameState: {

View File

@ -541,6 +541,7 @@ const SCENES = {
GamePractice:{
load(data) {
let buttons_bottom = [ ];
buttons_bottom.push(UI.button("Reset", () => { INTERFACE.reset(); }));
buttons_bottom.push(UI.button("Back", () => { LOAD(SCENES.Browse) }));
UI.nav([