• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Card Game (like Spider-Solitaire) in Cocoa -- Conceptual ideas needed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Card Game (like Spider-Solitaire) in Cocoa -- Conceptual ideas needed


  • Subject: Re: Card Game (like Spider-Solitaire) in Cocoa -- Conceptual ideas needed
  • From: Kyle Sluder <email@hidden>
  • Date: Fri, 12 Jun 2009 11:19:31 -0700

On Thu, Jun 11, 2009 at 11:04 AM, Florian
Witteler<email@hidden> wrote:
> 1) Would you use interface-builder files to lay out all the things like
> - whole gametable with stacks of cards
> - stacks of cards
> - the card itself (background image and some icon with text)
> or would you handle all the drawing by yourself?

The typical, pre-Core Animation way of doing this would be to have a
large view for the game table (let's call it GameTableView), which
uses an instance of different cell classes to draw the different
things on the board.  For example, in a poker game, there might be an
instance of CardCell and an instance of ChipCell.

Nowadays, we have Core Animation.  Instead of drawing one cell
repeatedly, we tend to use multiple CALayers, either with delegates or
subclassed.

> 2) How would you handle the dragging of a card (and the cards, which lie on
> top of this card)?

Read up on NSEvent and tracking loops.

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Card Game (like Spider-Solitaire) in Cocoa -- Conceptual ideas needed (From: Florian Witteler <email@hidden>)

  • Prev by Date: Re: Missing something about initialization
  • Next by Date: Re: How can we mount and unmount dmg files on MAC OS X?
  • Previous by thread: Card Game (like Spider-Solitaire) in Cocoa -- Conceptual ideas needed
  • Next by thread: Re: Card Game (like Spider-Solitaire) in Cocoa -- Conceptual ideas needed
  • Index(es):
    • Date
    • Thread