@@ -130,10 +130,8 @@ export class ConnectFourGame {
130
130
verticalIndex : number ,
131
131
sign : ConnectFourGameSign ,
132
132
) : boolean {
133
- console . log ( `CHECKING FOR VERTICAL WIN // index: ${ verticalIndex } ` ) ;
134
133
if ( verticalIndex >= 3 ) {
135
134
for ( let i = verticalIndex - 1 ; i > verticalIndex - 4 ; i -- ) {
136
- console . log ( `CHECKING FOR VERTICAL WIN // token @ ${ i } : ${ column . tokens [ i ] } ` ) ;
137
135
if ( column . tokens [ i ] != sign ) {
138
136
return false ;
139
137
}
@@ -174,7 +172,6 @@ export class ConnectFourGame {
174
172
verticalIndex : number ,
175
173
sign : ConnectFourGameSign ,
176
174
) : boolean {
177
- console . log ( `CHECKING FOR DIAGONAL WIN: ${ horizontalIndex } ${ verticalIndex } ${ sign } ` ) ;
178
175
let left_pointer_x = horizontalIndex ;
179
176
let left_pointer_y = verticalIndex ;
180
177
let right_pointer_x = horizontalIndex ;
@@ -199,10 +196,6 @@ export class ConnectFourGame {
199
196
200
197
if ( right_pointer_x - left_pointer_x + 1 >= 4 ) {
201
198
return true ;
202
- } else {
203
- console . log (
204
- `LEFT BOTTOM TOP RIGHT right_pointer_x: ${ right_pointer_x } left_pointer_x ${ left_pointer_x } ` ,
205
- ) ;
206
199
}
207
200
208
201
return false ;
@@ -238,10 +231,6 @@ export class ConnectFourGame {
238
231
239
232
if ( right_pointer_x - left_pointer_x + 1 >= 4 ) {
240
233
return true ;
241
- } else {
242
- console . log (
243
- `LEFT TOP RIGHT BOTTOM: right_pointer_x: ${ right_pointer_x } left_pointer_x ${ left_pointer_x } ` ,
244
- ) ;
245
234
}
246
235
247
236
return false ;
@@ -255,7 +244,6 @@ export class ConnectFourGame {
255
244
// as of this point the user hasn't won yet, so we just need to check if the token that was just placed
256
245
// is part of a winning combination
257
246
// newly placed token
258
- console . log ( '-------!!!!!!!--!!!!!!--------' ) ;
259
247
const horizontalIndex = columnIndex ;
260
248
const verticalIndex = state . columns [ columnIndex ] . fill - 1 ;
261
249
const column = state . columns [ columnIndex ] ;
@@ -456,7 +444,6 @@ export const getCodeyConnectFourSign = (): ConnectFourGameSign => {
456
444
} ;
457
445
458
446
export const updateColumn = ( column : ConnectFourColumn , sign : ConnectFourGameSign ) : boolean => {
459
- console . log ( '%%%%% UPDATE COLUMN %%%%%' ) ;
460
447
const fill : number = column . fill ;
461
448
if ( fill < CONNECT_FOUR_ROW_COUNT ) {
462
449
column . tokens [ fill ] = sign ;
0 commit comments