Skip to content

Commit

Permalink
현재 턴 표시 기능 작업 중 (표현 방식 결정 필요)
Browse files Browse the repository at this point in the history
  • Loading branch information
ipkn committed Oct 2, 2011
1 parent 3afa94e commit 1bec031
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions nodejs-server/clientlib.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ playSound = (soundName) ->

lastSuit = null
doCommitment = ->
now.notfyImTakingAction()
playSound "myturn"
systemMsg "공약 내세우기"

Expand Down Expand Up @@ -191,6 +192,7 @@ now.receiveDealtCards = (cards) ->
# 주공 당선 후 손 정리

now.requestRearrangeHand = (additionalCards) ->
now.notfyImTakingAction()
window.field.dealAdditionalCards(additionalCards, 0, ->
# TODO 여기서 공약 변경도 동시에 이루어짐
window.field.globalMessage("교체할 3장의 카드를 골라주세요.")
Expand Down Expand Up @@ -306,6 +308,8 @@ now.notifyFriendFirstTrick = ->
# 카드 내기

now.requestChooseCard = (currentTurn, option, fromServer = true) ->
if fromServer
now.notfyImTakingAction()
if fromServer
playSound "myturn"
player = 0
Expand Down Expand Up @@ -572,6 +576,9 @@ now.resetField = ->
# Miscellaneous
################################################################################

now.notifyInAction = (index) ->
# TODO display player[index] is currently taking action

now.showName = ->
systemMsg "i am #{@now.name}"

Expand Down
3 changes: 3 additions & 0 deletions nodejs-server/server.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ nowjs.on 'connect', ->
everyone.now.chat = (msg) ->
everyone.now.receiveChat @now.clientId, @now.name, msg

everyone.now.notfyImTakingAction = ->
everyone.now.notifyInAction indexFromClientId(@now.clientId)

enterState = (state) ->
# TODO refactor to state pattern
if state == everyone.now.WAITING_PLAYER
Expand Down

0 comments on commit 1bec031

Please sign in to comment.