36 lines
691 B
Lua
36 lines
691 B
Lua
local love = require "love"
|
|
|
|
require "menu"
|
|
require "blackjack"
|
|
|
|
function love.load()
|
|
love.window.setTitle("Spiele Auswahl")
|
|
currentScreen = "menu"
|
|
end
|
|
|
|
function love.update(dt)
|
|
if currentScreen == "blackjack" then
|
|
updateBlackjack(dt)
|
|
end
|
|
end
|
|
|
|
function love.draw()
|
|
if currentScreen == "menu" then
|
|
drawMenu()
|
|
elseif currentScreen == "blackjack" then
|
|
drawBlackjack()
|
|
end
|
|
end
|
|
|
|
function love.keypressed(key)
|
|
if currentScreen == "menu" then
|
|
if key == '1' then
|
|
currentScreen = "blackjack"
|
|
loadBlackjack()
|
|
end
|
|
elseif currentScreen == "blackjack" then
|
|
handleBlackjackInput(key)
|
|
end
|
|
end
|
|
|