added logc for win player condition