Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function draw()
- local function getCard()
- rm = math.random(1, 54)
- if rm == 1 then
- print("You have drawn the ace of spades")
- elseif rm == 2 then
- print("You have drawn the 2 of spades")
- elseif rm == 3 then
- print("You have drawn the 3 of spades")
- elseif rm == 4 then
- print("You have drawn the 4 of spades")
- elseif rm == 5 then
- print("You have drawn the 5 of spades")
- elseif rm == 6 then
- print("You have drawn the 6 of spades")
- elseif rm == 7 then
- print("You have drawn the 7 of spades")
- elseif rm == 8 then
- print("You have drawn the 8 of spades")
- elseif rm == 9 then
- print("You have drawn the 9 of spades")
- elseif rm == 10 then
- print("You have drawn the 10 of spades")
- elseif rm == 11 then
- print("You have drawn the jack of spades")
- elseif rm == 12 then
- print("You have drawn the queen of spades")
- elseif rm == 13 then
- print("You have drawn the king of spades")
- elseif rm == 14 then
- print("You have drawn the ace of clubs")
- elseif rm == 15 then
- print("You have drawn the 2 of clubs")
- elseif rm == 16 then
- print("You have drawn the 3 of clubs")
- elseif rm == 17 then
- print("You have drawn the 4 of clubs")
- elseif rm == 18 then
- print("You have drawn the 5 of clubs")
- elseif rm == 19 then
- print("You have drawn the 6 of clubs")
- elseif rm == 20 then
- print("You have drawn the 7 of clubs")
- elseif rm == 21 then
- print("You have drawn the 8 of clubs")
- elseif rm == 22 then
- print("You have drawn the 9 of clubs")
- elseif rm == 23 then
- print("You have drawn the 10 of clubs")
- elseif rm == 24 then
- print("You have drawn the jack of clubs")
- elseif rm == 25 then
- print("You have drawn the queen of clubs")
- elseif rm == 26 then
- print("You have drawn the king of clubs")
- elseif rm == 27 then
- print("You have drawn the ace of hearts")
- elseif rm == 28 then
- print("You have drawn the 2 of hearts")
- elseif rm == 29 then
- print("You have drawn the 3 of hearts")
- elseif rm == 30 then
- print("You have drawn the 4 of hearts")
- elseif rm == 31 then
- print("You have drawn the 5 of hearts")
- elseif rm == 32 then
- print("You have drawn the 6 of hearts")
- elseif rm == 33 then
- print("You have drawn the 7 of hearts")
- elseif rm == 34 then
- print("You have drawn the 8 of hearts")
- elseif rm == 35 then
- print("You have drawn the 9 of hearts")
- elseif rm == 36 then
- print("You have drawn the 10 of hearts")
- elseif rm == 37 then
- print("You have drawn the jack of hearts")
- elseif rm == 38 then
- print("You have drawn the queen of hearts")
- elseif rm == 39 then
- print("You have drawn the king of hearts")
- elseif rm == 40 then
- print("You have drawn the ace of diamonds")
- elseif rm == 41 then
- print("You have drawn the 2 of diamonds")
- elseif rm == 42 then
- print("You have drawn the 3 of diamonds")
- elseif rm == 43 then
- print("You have drawn the 4 of diamonds")
- elseif rm == 44 then
- print("You have drawn the 5 of diamonds")
- elseif rm == 45 then
- print("You have drawn the 6 of diamonds")
- elseif rm == 46 then
- print("You have drawn the 7 of diamonds")
- elseif rm == 47 then
- print("You have drawn the 8 of diamonds")
- elseif rm == 48 then
- print("You have drawn the 9 of diamonds")
- elseif rm == 49 then
- print("You have drawn the 10 of diamonds")
- elseif rm == 50 then
- print("You have drawn the jack of diamonds")
- elseif rm == 51 then
- print("You have drawn the queen of diamonds")
- elseif rm == 52 then
- print("You have drawn the king of diamonds")
- else
- print("You have drawn a joker!")
- end
- end
- for i = 0, 5 do --this just draws x amount of cards.
- getCard()
- end
- end
- term.clear()
- term.setCursorPos(1, 1)
- input = read()
- draw() --this actually draws the cards
Advertisement
Add Comment
Please, Sign In to add comment