Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getNumber()
- local tCharacters = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'}
- local bShouldBeNumber = false;
- if math.random(0, 1) == 1 then
- bShouldBeNumber = true;
- end
- if bShouldBeNumber then
- return math.random(0, 9)
- else
- return tCharacters[math.random(1, 26)]
- end
- end
- function printEye_Left()
- printNumbers(2, 49/2 - 3, 2, 19/2 - 2)
- end
- function printEye_Right()
- printNumbers(49/2 + 4, 50, 2, 19/2 - 2)
- end
- function printMouth_LeftSide()
- printNumbers(2, 49/2 - 14, 19/2 + 2, 17)
- end
- function printMouth_RightSide()
- printNumbers(49/2 + 17, 50, 19/2 + 2, 17)
- end
- function printMouth_Middle()
- printNumbers(2, 49/2 + 17, 19/2 + 5, 17)
- end
- function printNose()
- printNumbers(49/2 - 2, 49/2 + 3, 19/2 - 1, 19/2 + 2)
- end
- function printNumbers(x_start, x_end, y_start, y_end)
- for xPos = x_start, x_end do
- for yPos = y_start, y_end do
- term.setCursorPos(xPos, yPos)
- term.write(getNumber())
- end
- end
- end
- while true do
- term.clear()
- term.setCursorPos(1, 1)
- printEye_Right()
- printEye_Left()
- printMouth_RightSide()
- printMouth_LeftSide()
- printMouth_Middle()
- printNose()
- sleep(0.1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement