Skip to content

Commit

Permalink
[#181] Fixed test error
Browse files Browse the repository at this point in the history
  • Loading branch information
Ido-Barnea committed Feb 10, 2024
1 parent 74dc476 commit b0e9f29
Show file tree
Hide file tree
Showing 26 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion development/code/Game.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { Queen } from './logic/pieces/Queen';
import { Rook } from './logic/pieces/Rook';
import { RulesManager } from './logic/rules/RulesManager';
import { showWinningAlert as showGameEndAlert } from './ui/Screen';
import { Logger } from './ui/logger/Logger';
import { Logger } from './ui/logs/Logger';

let rulesManager: RulesManager;
const whitePlayer = new Player(PlayerColors.WHITE);
Expand Down
4 changes: 2 additions & 2 deletions development/code/Index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { game } from './Game';
import { onActionTriggered, onFellOffTheBoardTriggered, renderScreen } from './LogicAdapter';
import { highlightSquare, initializeBoards } from './ui/BoardManager';
import { initializeEventListeners, setOnAction, setOnFellOffTheBoard, setOnHighlight } from './ui/Events';
import { Log } from './ui/logger/Log';
import { Logger } from './ui/logger/Logger';
import { Log } from './ui/logs/Log';
import { Logger } from './ui/logs/Logger';

function setGameEventHandlers() {
setOnAction(onActionTriggered);
Expand Down
2 changes: 1 addition & 1 deletion development/code/logic/PieceLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { Position, Square } from './pieces/PiecesUtilities';
import { Player } from './Players';
import { Knight } from './pieces/Knight';
import { Shield } from './items/Shield';
import { KillLog, Log, MovementLog } from '../ui/logger/Log';
import { KillLog, Log, MovementLog } from '../ui/logs/Log';

function validatePlayerAction(
draggedPiece: Piece,
Expand Down
2 changes: 1 addition & 1 deletion development/code/logic/items/Inventory.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Log } from '../../ui/logger/Log';
import { Log } from '../../ui/logs/Log';
import { Player } from '../Players';
import { Item } from './Items';

Expand Down
2 changes: 1 addition & 1 deletion development/code/logic/items/Items.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jest.mock('../../ui/BoardManager.ts', () => ({
jest.mock('../../ui/Screen.ts', () => ({
renderPlayersInformation: jest.fn(),
}));
jest.mock('../../ui/Logger.ts');
jest.mock('../../ui/logs/Logger.ts');
jest.mock('../../ui/Events.ts', () => ({}));

game.getCurrentPlayer = jest.fn().mockReturnValue(whitePlayer);
Expand Down
2 changes: 1 addition & 1 deletion development/code/logic/items/Items.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Log } from '../../ui/logger/Log';
import { Log } from '../../ui/logs/Log';
import { Piece } from '../pieces/Piece';
import { Position } from '../pieces/PiecesUtilities';
import { Player } from '../Players';
Expand Down
2 changes: 1 addition & 1 deletion development/code/logic/items/PiggyBank.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Item } from './Items';
import { Piece } from '../pieces/Piece';
import { piggyBankResource } from '../../ui/Resources';
import { Position } from '../pieces/PiecesUtilities';
import { Log } from '../../ui/logger/Log';
import { Log } from '../../ui/logs/Log';

export class PiggyBank extends Item {
constructor(position?: Position) {
Expand Down
2 changes: 1 addition & 1 deletion development/code/logic/items/Shield.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Piece } from '../pieces/Piece';
import { shieldResource } from '../../ui/Resources';
import { Position } from '../pieces/PiecesUtilities';
import { game } from '../../Game';
import { Log } from '../../ui/logger/Log';
import { Log } from '../../ui/logs/Log';

export class Shield extends Item {
constructor(position?: Position) {
Expand Down
2 changes: 1 addition & 1 deletion development/code/logic/items/Trap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { trapResource } from '../../ui/Resources';
import { spawnItemOnBoard } from '../../LogicAdapter';
import { game } from '../../Game';
import { Position } from '../pieces/PiecesUtilities';
import { Log } from '../../ui/logger/Log';
import { Log } from '../../ui/logs/Log';

export class Trap extends Item {
constructor(position?: Position) {
Expand Down
2 changes: 1 addition & 1 deletion development/code/logic/pieces/Bishop.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jest.mock('../../ui/BoardManager.ts', () => ({
jest.mock('../../ui/Screen.ts', () => ({
renderPlayersInformation: jest.fn(),
}));
jest.mock('../../ui/Logger.ts');
jest.mock('../../ui/logs/Logger.ts');
jest.mock('../../ui/Events.ts', () => ({}));

game.getCurrentPlayer = jest.fn().mockReturnValue(whitePlayer);
Expand Down
2 changes: 1 addition & 1 deletion development/code/logic/pieces/King.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jest.mock('../../ui/BoardManager.ts', () => ({
jest.mock('../../ui/Screen.ts', () => ({
renderPlayersInformation: jest.fn(),
}));
jest.mock('../../ui/Logger.ts');
jest.mock('../../ui/logs/Logger.ts');
jest.mock('../../ui/Events.ts', () => ({}));

game.getCurrentPlayer = jest.fn().mockReturnValue(whitePlayer);
Expand Down
2 changes: 1 addition & 1 deletion development/code/logic/pieces/Knight.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jest.mock('../../ui/BoardManager.ts', () => ({
jest.mock('../../ui/Screen.ts', () => ({
renderPlayersInformation: jest.fn(),
}));
jest.mock('../../ui/Logger.ts');
jest.mock('../../ui/logs/Logger.ts');
jest.mock('../../ui/Events.ts', () => ({}));

game.getCurrentPlayer = jest.fn().mockReturnValue(whitePlayer);
Expand Down
2 changes: 1 addition & 1 deletion development/code/logic/pieces/Pawn.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jest.mock('../../ui/BoardManager.ts', () => ({
jest.mock('../../ui/Screen.ts', () => ({
renderPlayersInformation: jest.fn(),
}));
jest.mock('../../ui/Logger.ts');
jest.mock('../../ui/logs/Logger.ts');
jest.mock('../../ui/Events.ts', () => ({}));

game.getCurrentPlayer = jest.fn().mockReturnValue(whitePlayer);
Expand Down
2 changes: 1 addition & 1 deletion development/code/logic/pieces/Queen.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jest.mock('../../ui/BoardManager.ts', () => ({
jest.mock('../../ui/Screen.ts', () => ({
renderPlayersInformation: jest.fn(),
}));
jest.mock('../../ui/Logger.ts');
jest.mock('../../ui/logs/Logger.ts');
jest.mock('../../ui/Events.ts', () => ({}));

game.getCurrentPlayer = jest.fn().mockReturnValue(whitePlayer);
Expand Down
2 changes: 1 addition & 1 deletion development/code/logic/pieces/Rook.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jest.mock('../../ui/BoardManager.ts', () => ({
jest.mock('../../ui/Screen.ts', () => ({
renderPlayersInformation: jest.fn(),
}));
jest.mock('../../ui/Logger.ts');
jest.mock('../../ui/logs/Logger.ts');
jest.mock('../../ui/Events.ts', () => ({}));

game.getCurrentPlayer = jest.fn().mockReturnValue(whitePlayer);
Expand Down
2 changes: 1 addition & 1 deletion development/code/logic/rules/BaseRule.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { game } from '../../Game';
import { RuleLog } from '../../ui/logger/Log';
import { RuleLog } from '../../ui/logs/Log';

export interface Rule {
description: string;
Expand Down
2 changes: 1 addition & 1 deletion development/code/logic/rules/BountyRule.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { game } from '../../Game';
import { RuleLog } from '../../ui/logger/Log';
import { RuleLog } from '../../ui/logs/Log';
import { MIN_KILLINGS_FOR_BOUNTY } from '../Constants';
import { BaseRule } from './BaseRule';

Expand Down
2 changes: 1 addition & 1 deletion development/code/logic/rules/CoupRule.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { game } from '../../Game';
import { changePieceToAnotherPlayer } from '../../LogicAdapter';
import { RuleLog } from '../../ui/logger/Log';
import { RuleLog } from '../../ui/logs/Log';
import { King } from '../pieces/King';
import { BaseRule } from './BaseRule';

Expand Down
2 changes: 1 addition & 1 deletion development/code/logic/rules/EmptyPocketsRule.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { game } from '../../Game';
import { RuleLog } from '../../ui/logger/Log';
import { RuleLog } from '../../ui/logs/Log';
import { BaseRule } from './BaseRule';

export class EmptyPocketsRule extends BaseRule {
Expand Down
2 changes: 1 addition & 1 deletion development/code/logic/rules/ExperienceOnKillRule.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { game } from '../../Game';
import { RuleLog } from '../../ui/logger/Log';
import { RuleLog } from '../../ui/logs/Log';
import { BaseRule } from './BaseRule';

export class ExperienceOnKillRule extends BaseRule {
Expand Down
2 changes: 1 addition & 1 deletion development/code/logic/rules/FirstBloodRule.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { game } from '../../Game';
import { RuleLog } from '../../ui/logger/Log';
import { RuleLog } from '../../ui/logs/Log';
import { BaseRule } from './BaseRule';

export class FirstBloodRule extends BaseRule {
Expand Down
2 changes: 1 addition & 1 deletion development/code/logic/rules/FriendlyFireRule.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { game } from '../../Game';
import { RuleLog } from '../../ui/logger/Log';
import { RuleLog } from '../../ui/logs/Log';
import { BaseRule } from './BaseRule';

export class FriendlyFireRule extends BaseRule {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { game } from '../../Game';
import { KillLog } from '../../ui/logger/Log';
import { KillLog } from '../../ui/logs/Log';
import { BaseRule } from './BaseRule';

export class PiecesCanFallOffTheBoardRule extends BaseRule {
Expand Down
2 changes: 1 addition & 1 deletion development/code/logic/rules/WithAgeComesWisdomRule.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { game } from '../../Game';
import { RuleLog } from '../../ui/logger/Log';
import { RuleLog } from '../../ui/logs/Log';
import { BaseRule } from './BaseRule';

export class WithAgeComesWisdomRule extends BaseRule {
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit b0e9f29

Please sign in to comment.