js game strategy