View/Edit #5730:draw_card

Switch to edit mode.

Name(s): draw_card
1:  ":draw_card(val, suit), where val is in the 1-13 range (13 = king), and suit is \"D\",\"C\",\"H\", or \"S\""
2:  {val, suit} = args
3:  name = {"A", "2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K"}[val]
4:  cardform = this.card_blank
5:  cardform = this:plot_pixel(cardform, 2, 3, suit)
6:  cardform = this:plot_pixel(cardform, 6, 4, suit)
7:  if (name == "10")
8:    cardform = this:plot_pixel(cardform, 3, 2, "0")
9:    cardform = this:plot_pixel(cardform, 5, 5, "0")
10: endif
11: cardform = this:plot_pixel(cardform, 2, 2, name[1])
12: cardform = this:plot_pixel(cardform, 6, 5, name[1])
13: return cardform

Verb arguments: this none this
Verb perms: Readable eXecutable NOT-Debug
Verb owned by: manta (#7165)

You are not logged in.

[home | help | who | search | setup | code]