mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 13:07:26 +01:00
go fmt
This commit is contained in:
parent
7cea6f4bc8
commit
2b4dc28d91
@ -68,18 +68,15 @@ func (s *GameScene) Update(state *GameState) {
|
|||||||
s.currentPieceAngle = s.field.RotatePieceRight(piece, x, y, angle)
|
s.currentPieceAngle = s.field.RotatePieceRight(piece, x, y, angle)
|
||||||
moved = angle != s.currentPieceAngle
|
moved = angle != s.currentPieceAngle
|
||||||
}
|
}
|
||||||
if l := state.Input.StateForKey(ui.KeyLeft);
|
if l := state.Input.StateForKey(ui.KeyLeft); l == 1 || (10 <= l && l%2 == 0) {
|
||||||
l == 1 || (10 <= l && l % 2 == 0) {
|
|
||||||
s.currentPieceX = s.field.MovePieceToLeft(piece, x, y, angle)
|
s.currentPieceX = s.field.MovePieceToLeft(piece, x, y, angle)
|
||||||
moved = x != s.currentPieceX
|
moved = x != s.currentPieceX
|
||||||
}
|
}
|
||||||
if r := state.Input.StateForKey(ui.KeyRight);
|
if r := state.Input.StateForKey(ui.KeyRight); r == 1 || (10 <= r && r%2 == 0) {
|
||||||
r == 1 || (10 <= r && r % 2 == 0) {
|
|
||||||
s.currentPieceX = s.field.MovePieceToRight(piece, x, y, angle)
|
s.currentPieceX = s.field.MovePieceToRight(piece, x, y, angle)
|
||||||
moved = y != s.currentPieceX
|
moved = y != s.currentPieceX
|
||||||
}
|
}
|
||||||
if d := state.Input.StateForKey(ui.KeyDown);
|
if d := state.Input.StateForKey(ui.KeyDown); (d-1)%2 == 0 {
|
||||||
(d - 1) % 2 == 0 {
|
|
||||||
s.currentPieceY = s.field.DropPiece(piece, x, y, angle)
|
s.currentPieceY = s.field.DropPiece(piece, x, y, angle)
|
||||||
moved = y != s.currentPieceY
|
moved = y != s.currentPieceY
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user