From 42f84de6959ef167f0e85c1b25e596f8632fe522 Mon Sep 17 00:00:00 2001 From: knmarcin Date: Wed, 14 Nov 2018 17:18:33 +0100 Subject: [PATCH] Wstepny pomysl interakcji pomiedzy paletkami a uzytkownikami --- Pong.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Pong.go b/Pong.go index 3282da4..8f67005 100644 --- a/Pong.go +++ b/Pong.go @@ -12,7 +12,8 @@ var Player2 [10]string var Ball [10][30]string var BallDirection [10][30]string var BallSpeed int - +var GameOver bool +var LastPressedKey byte func main() { fmt.Println("hello world!") CreateBoard() @@ -68,3 +69,12 @@ func TestingGit() { fmt.Print("Sprawdzam") } +func Loop() { + GameOver = false + for GameOver = false { + if _,err:= fmt.Scan(&LastPressedKey); + if LastPressedKey == "w" +} + + +}