private void updateBestScore() { if (currentScore > record.getBestScode()) { record.setBestScode(currentScore); tv_bestScore.setText(currentScore + ""); } }
public Game(Activity context, TileGrid tileGrid) { this.context = context; this.tileGrid = tileGrid; record = new BestScode(context); tv_currenScore = (TextView) context.findViewById(R.id.tv_currenScore); tv_currenScore.setText("0"); tv_bestScore = (TextView) context.findViewById(R.id.tv_bestScore); tv_bestScore.setText(record.getBestScode() + ""); newGame(); }