From ff40a5507b96a6fc4fe95fc1fd564990c2540c89 Mon Sep 17 00:00:00 2001 From: Simon Kellet Date: Mon, 22 Jul 2024 23:28:46 +0100 Subject: [PATCH] draws score --- Win/DrawWin.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Win/DrawWin.lua b/Win/DrawWin.lua index c916d6d..fae2189 100644 --- a/Win/DrawWin.lua +++ b/Win/DrawWin.lua @@ -4,9 +4,9 @@ local function winner() local opacity = 0.3 local s = "" - if _G.P1_WIN then + if not _G.P1_WIN then s = "P1 Win! R - Restart" - elseif _G.P2_WIN then + elseif not _G.P2_WIN then s = "P2 Win! R - Restart" end @@ -23,7 +23,12 @@ local function winner() love.graphics.setFont(MenuFont) love.graphics.setColor(1, 1, 1) -- white - love.graphics.print(s, centreX - sw / 2, centreY - sh / 2) + love.graphics.print(s, centreX - sw / 2, centreY - sh / 2) -- who won + love.graphics.print( + "" .. _G.P1_COUNT .. ":" .. "" .. _G.P2_COUNT, + (centreX - sw / 2), + (centreY - sh / 2) - sh / 1.5 + ) -- score end end