Bug 628

Summary: The score bean only appears once
Product: CS3343 2021/22 Group16 Greedy Snake Reporter: LI Ruoxin <ruoxinli3-c>
Component: Model sectionAssignee: Baron Qu <zhiyanqu2-c>
Status: RESOLVED FIXED    
Severity: major CC: ruoxinli3-c
Priority: ---    
Version: Ver 2.0   
Hardware: PC   
OS: Windows   

Description LI Ruoxin 2021-11-29 18:53:08 HKT
Steps to reproduce:
1. Run Main.java
2. Press any Arrow Key to start the game

Actual Results: The score bean only appears once

Expected Results: The score bean should appear each time after a fixed number of normal beans have appeared.
Comment 1 LI Ruoxin 2021-11-29 19:01:51 HKT
Game.java
Modified an if statement ( missing an & sign before):
if (time >= SConstant.SC_SCORE_BEAN_DEFAULT_APPEAR_TIME && snake.getScore() > prevScore) {
				bean = ScoreBean.getInstance();
				countTime = SConstant.SC_SCORE_BEAN_DEFAULT_DISAPPEAR_TIME;
			}