private void Initialise(Board board, Bank bank, IDice dice, ICardManager cardManager, List <Player> players) { Bank = bank; Board = board; AssetManager = board.AssetManager; Dice = dice; Players = players; CardManager = cardManager; Winner = null; PlayerTurnsPlayed = 0; FreeParking = new FreeParking(Bank); // Set players on Go foreach (var player in players) { player.Location = Board.Go; } // Bank owns everything to start board.AssetManager.AllAssets.ForEach(x => bank.PurchaseAsset(x)); NextPlayer = players[0]; }
public void TestInitialize() { _bank = new Bank(); _assetManager = new AssetManager(); _player = new Player(); _player2 = new Player(); _freeParking = new FreeParking(_bank); _assetManager.AllAssets.ForEach(x => _bank.PurchaseAsset(x)); }
public void TestInitialize() { _bank = new Bank(); _player = new Player(); _assetManager = new AssetManager(); _assetManager.AllAssets.ForEach(x => _bank.PurchaseAsset(x)); _oldKentRoadProperty = _assetManager.OldKentRoad; _whitechapelProperty = _assetManager.Whitechapel; _station = _assetManager.KingsCrossStation; _utility = _assetManager.ElectricCompany; _player.SetCashTotal(2000); _player.PurchaseAsset(_oldKentRoadProperty); }