aboutsummaryrefslogtreecommitdiffstats
path: root/lib/gs/contribs/othello
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2011-09-16 17:05:46 +0200
committerBjörn-Egil Dahlberg <[email protected]>2011-09-16 17:05:46 +0200
commit2c79dee4b4f2a0a692cdf28399fc069eca18f07a (patch)
tree9d8ded2e9a49a6b59d4f7348a7a75123f0cbe5d0 /lib/gs/contribs/othello
parent211389b07fed7ac2bc1d7f713f0b42dc93cf615c (diff)
downloadotp-2c79dee4b4f2a0a692cdf28399fc069eca18f07a.tar.gz
otp-2c79dee4b4f2a0a692cdf28399fc069eca18f07a.tar.bz2
otp-2c79dee4b4f2a0a692cdf28399fc069eca18f07a.zip
gs: Update to modern type guards in examples
Diffstat (limited to 'lib/gs/contribs/othello')
-rw-r--r--lib/gs/contribs/othello/othello_board.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gs/contribs/othello/othello_board.erl b/lib/gs/contribs/othello/othello_board.erl
index 0206ba2ded..6ccb79b7e4 100644
--- a/lib/gs/contribs/othello/othello_board.erl
+++ b/lib/gs/contribs/othello/othello_board.erl
@@ -147,7 +147,7 @@ but_pressed("Help",_ButtId,_User,GamePid,_Shell,_Wids,_Op) ->
but_pressed("Newgame",_ButtId,_User,GamePid,_Shell,Wids,Options) ->
new_game(GamePid,Wids,Options);
but_pressed([],ButtId,User,GamePid,_Shell,_Wids,_Op)
- when pid(GamePid),User == player ->
+ when is_pid(GamePid),User == player ->
[C,R] = atom_to_list(ButtId),
GamePid ! {self(),position,othello_adt:pos(C-96,translate(R-48))},
GamePid;
@@ -243,7 +243,7 @@ game_msg(Msg,User,GamePid,Shell,Wids,Options) ->
end.
-new_game(GamePid,Wids,Options) when pid(GamePid) ->
+new_game(GamePid,Wids,Options) when is_pid(GamePid) ->
exit(GamePid,kill),
new_game(Wids,Options);
new_game(_,Wids,Options) ->