Skip to content

Commit

Permalink
[trivial] minor fixes :)
Browse files Browse the repository at this point in the history
  • Loading branch information
Monkey-bored committed Feb 1, 2024
1 parent 67e40bc commit c60aeef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
10 changes: 4 additions & 6 deletions development/code/LogicAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
highlightLastMove,
getPieceElementBySquareId,
} from './ui/BoardManager';
import { renderPlayersInformation, renderNewRule} from './ui/Screen';
import { renderPlayersInformation, renderNewRule } from './ui/Screen';

export function renderScreen() {
renderPlayersInformation();
Expand Down Expand Up @@ -192,11 +192,9 @@ export function changePieceToAnotherPlayer(piece: Piece) {

export function winGame(winnerPlayer: Player){
const winnerColor =
winnerPlayer.color == PlayerColors.WHITE
? 'White'
: 'Black';
winnerPlayer.color === PlayerColors.WHITE
? 'White'
: 'Black';

game.setWinner(winnerColor);

// showWinningAlert(winnerColor);
}
1 change: 0 additions & 1 deletion development/code/logic/PieceLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ export function onPlayerAction(

if (target instanceof Piece) {
onActionAttackMove(draggedPiece, target);

} else {
const targetSquare = (target instanceof Item) ? { position: target.position } : (target as Square);
onActionNonAttackMove(draggedPiece, targetSquare);
Expand Down

0 comments on commit c60aeef

Please sign in to comment.