Skip to content

Commit

Permalink
Merge branch 'Landing-point-feature'
Browse files Browse the repository at this point in the history
  • Loading branch information
jinhuid committed Jun 11, 2024
2 parents 107e5d7 + 9ab2de9 commit 5ed469a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/game/Helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class Helper {

drawNextBrick(ctx: CanvasRenderingContext2D, brick: IBrick) {
ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height)
this.drawBrick(ctx, { ...brick, x: 0, y: 0 } as IBrick)
this.drawBrick(ctx, { ...brick, point: { x: 0, y: 0 } })
}
computeScore(eliminateNum: number) {
switch (eliminateNum) {
Expand Down
8 changes: 4 additions & 4 deletions src/game/Renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ export default class Renderer implements IGameRenderer {
private lastTime = 0
private pauseTime = 0
private game: IGame
private _brick: Brick
private _nextBrick: Brick
private over: boolean = false
private pause: boolean = false
_canvasWithMapCtx: ICanvasWithMapCtx
private _brick: Brick
private _nextBrick: Brick
private _canvasWithMapCtx: ICanvasWithMapCtx
constructor(game: IGame) {
this._canvasWithMapCtx = new CanvasWithMapCtx()
this.gameHelper = gameHelper
this.game = game
this._brick = new Brick(this.gameHelper.getRandomLetter())
this._nextBrick = new Brick(this.gameHelper.getRandomLetter())
this._canvasWithMapCtx = new CanvasWithMapCtx()
this.operation = new Operation(
this.game,
this._canvasWithMapCtx,
Expand Down

0 comments on commit 5ed469a

Please sign in to comment.