3
0
mirror of https://github.com/pragma-/pbot.git synced 2026-02-21 08:47:59 +01:00

Plugin/Battleship: shrink default board size for quicker games

This commit is contained in:
Pragmatic Software 2026-02-19 22:11:43 -08:00
parent fdd176452b
commit cbf7c933b0
No known key found for this signature in database
GPG Key ID: CC916B6E3C84ECCE
2 changed files with 3 additions and 3 deletions

View File

@ -100,7 +100,7 @@ sub initialize($self, %conf) {
$self->{TILE_SHIP} = ['A' .. chr ord('A') + $self->{MAX_PLAYERS} - 1];
# default board dimensions
$self->{BOARD_X} = 12;
$self->{BOARD_X} = 10;
$self->{BOARD_Y} = 8;
# number of ships per player
@ -563,7 +563,7 @@ sub init_game($self, $state) {
$self->{N_Y} = $self->{BOARD_Y};
# increase board width by player count
$self->{N_X} += @{$state->{players}} * 2;
$self->{N_X} += (@{$state->{players}} - 2) * 4;
# default count of ships per player
$self->{SHIPS} = $self->{SHIP_COUNT};

View File

@ -25,7 +25,7 @@ use PBot::Imports;
# These are set by the /misc/update_version script
use constant {
BUILD_NAME => "PBot",
BUILD_REVISION => 4935,
BUILD_REVISION => 4936,
BUILD_DATE => "2026-02-19",
};