playingTeamID: 1
ball on points: 1
redCount: 15
strokenBallsCount: 1
fallenRedCount: 2
wonPoints: 0
lostPoints: 0
someInTable: true
pottedBalls: 0
Team 1 Points: 4
Team 2 Points: 4
PLAYER 1 PLAYER 2 4 4    
===GAME EVENTS===
Begin shot: Player 1
Potted balls count: 2
Foul 4 points : Expected 1, but hit 5
Foul 4 points : causing the cue ball to miss all object balls
Foul 4 points : 5 was potted, while 1 was expected
ball.Points: 5
teams[playingTeamID - 1].BallOn.Points: 1
fallenRedCount: 1
redCount: 15
Lost 4 points.
wonPoints: 0, lostPoints: 4
End shot: Player 1
Begin shot: Player 2
Potted balls count: 2
Foul 4 points : Expected 1, but hit 2
Foul 4 points : causing the cue ball to miss all object balls
Foul 4 points : 2 was potted, while 1 was expected
ball.Points: 2
teams[playingTeamID - 1].BallOn.Points: 1
fallenRedCount: 2
redCount: 15
Lost 4 points.
wonPoints: 0, lostPoints: 4
End shot: Player 2
Begin shot: Player 1
Potted balls count: 0
wonPoints: 0, lostPoints: 0
End shot: Player 1

 

 
 

下载代码说明
X关闭

html5 canvas实现的斯诺克桌球游戏源码

这是一款基于html5 canvas实现的斯诺克桌球游戏源码。画面中斯诺克桌球的球案上按照规则摆放排列着红球、彩球与白球。同时球案上浮现出风扇转动的阴影视觉效果。玩家通过鼠标控制球杆的击球方向,玩家按照斯诺克游戏规则击打一个红球、一个彩球的击打。待到红球打完再按照黄、绿、咖啡、蓝、粉、黑的顺序依次击打各色彩球。游戏结束时以得分高者获胜。整体游戏视觉效果逼真自然。建议使用支持HTML5与css3效