Small web game development: Spider Solitaire (End)

achieve mobile

In the last article, we have implemented drag and drop, and used spider.from to record where to start drag and drop.

Now, we will continue to work backwards to achieve the placement of the poker.

The placement rules are also very simple, regardless of the suit, as long as there is no poker in the current position, or the number of the top poker is the number minus one from the maximum number of the mobile poker, then it is a legal move.

So, with this logic, we only need to modify the handling of the mouseup event.

		$(

Guess you like

Origin blog.csdn.net/superwfei/article/details/131679471