nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9fc4c86
)
dino: remove old style init
author
Jean Privat
<jean@pryen.org>
Fri, 12 Feb 2016 02:45:34 +0000
(21:45 -0500)
committer
Jean Privat
<jean@pryen.org>
Fri, 12 Feb 2016 02:45:34 +0000
(21:45 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>
examples/mnit_dino/src/game_logic.nit
patch
|
blob
|
history
diff --git
a/examples/mnit_dino/src/game_logic.nit
b/examples/mnit_dino/src/game_logic.nit
index
6fa0d3f
..
63b6d53
100644
(file)
--- a/
examples/mnit_dino/src/game_logic.nit
+++ b/
examples/mnit_dino/src/game_logic.nit
@@
-133,16
+133,9
@@
class GamePos
var x : Int
var y : Int
- init ( x, y : Int )
- do
- self.x = x
- self.y = y
- end
-
init copy( src : GamePos )
do
- x = src.x
- y = src.y
+ init(src.x, src.y)
end
fun squared_dist_with( other : GamePos ) : Int