mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-11-22 16:59:03 -06:00
Shrunk the bone coloring code
This commit is contained in:
parent
8383d3f445
commit
57721ed35d
@ -41,57 +41,24 @@ Ruleset.pieces = 7
|
|||||||
|
|
||||||
function Ruleset:new(game_mode)
|
function Ruleset:new(game_mode)
|
||||||
self.game = game_mode
|
self.game = game_mode
|
||||||
|
local bones
|
||||||
if config.gamesettings.piece_colour == 1 then
|
if config.gamesettings.piece_colour == 1 then
|
||||||
blocks["bone"] = (not self.world) and
|
bones = self.world and "w" or ""
|
||||||
{
|
|
||||||
R = love.graphics.newImage("res/img/bone.png"),
|
|
||||||
O = love.graphics.newImage("res/img/bone.png"),
|
|
||||||
Y = love.graphics.newImage("res/img/bone.png"),
|
|
||||||
G = love.graphics.newImage("res/img/bone.png"),
|
|
||||||
C = love.graphics.newImage("res/img/bone.png"),
|
|
||||||
B = love.graphics.newImage("res/img/bone.png"),
|
|
||||||
M = love.graphics.newImage("res/img/bone.png"),
|
|
||||||
F = love.graphics.newImage("res/img/bone.png"),
|
|
||||||
A = love.graphics.newImage("res/img/bone.png"),
|
|
||||||
X = love.graphics.newImage("res/img/bone.png"),
|
|
||||||
} or {
|
|
||||||
R = love.graphics.newImage("res/img/bonew.png"),
|
|
||||||
O = love.graphics.newImage("res/img/bonew.png"),
|
|
||||||
Y = love.graphics.newImage("res/img/bonew.png"),
|
|
||||||
G = love.graphics.newImage("res/img/bonew.png"),
|
|
||||||
C = love.graphics.newImage("res/img/bonew.png"),
|
|
||||||
B = love.graphics.newImage("res/img/bonew.png"),
|
|
||||||
M = love.graphics.newImage("res/img/bonew.png"),
|
|
||||||
F = love.graphics.newImage("res/img/bonew.png"),
|
|
||||||
A = love.graphics.newImage("res/img/bonew.png"),
|
|
||||||
X = love.graphics.newImage("res/img/bonew.png"),
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
blocks["bone"] = (config.gamesettings.piece_colour == 2) and
|
bones = config.gamesettings.piece_colour == 3 and "w" or ""
|
||||||
{
|
|
||||||
R = love.graphics.newImage("res/img/bone.png"),
|
|
||||||
O = love.graphics.newImage("res/img/bone.png"),
|
|
||||||
Y = love.graphics.newImage("res/img/bone.png"),
|
|
||||||
G = love.graphics.newImage("res/img/bone.png"),
|
|
||||||
C = love.graphics.newImage("res/img/bone.png"),
|
|
||||||
B = love.graphics.newImage("res/img/bone.png"),
|
|
||||||
M = love.graphics.newImage("res/img/bone.png"),
|
|
||||||
F = love.graphics.newImage("res/img/bone.png"),
|
|
||||||
A = love.graphics.newImage("res/img/bone.png"),
|
|
||||||
X = love.graphics.newImage("res/img/bone.png"),
|
|
||||||
} or {
|
|
||||||
R = love.graphics.newImage("res/img/bonew.png"),
|
|
||||||
O = love.graphics.newImage("res/img/bonew.png"),
|
|
||||||
Y = love.graphics.newImage("res/img/bonew.png"),
|
|
||||||
G = love.graphics.newImage("res/img/bonew.png"),
|
|
||||||
C = love.graphics.newImage("res/img/bonew.png"),
|
|
||||||
B = love.graphics.newImage("res/img/bonew.png"),
|
|
||||||
M = love.graphics.newImage("res/img/bonew.png"),
|
|
||||||
F = love.graphics.newImage("res/img/bonew.png"),
|
|
||||||
A = love.graphics.newImage("res/img/bonew.png"),
|
|
||||||
X = love.graphics.newImage("res/img/bonew.png"),
|
|
||||||
}
|
|
||||||
end
|
end
|
||||||
|
blocks.bone = {
|
||||||
|
R = love.graphics.newImage("res/img/bone" .. bones .. ".png"),
|
||||||
|
O = love.graphics.newImage("res/img/bone" .. bones .. ".png"),
|
||||||
|
Y = love.graphics.newImage("res/img/bone" .. bones .. ".png"),
|
||||||
|
G = love.graphics.newImage("res/img/bone" .. bones .. ".png"),
|
||||||
|
C = love.graphics.newImage("res/img/bone" .. bones .. ".png"),
|
||||||
|
B = love.graphics.newImage("res/img/bone" .. bones .. ".png"),
|
||||||
|
M = love.graphics.newImage("res/img/bone" .. bones .. ".png"),
|
||||||
|
F = love.graphics.newImage("res/img/bone" .. bones .. ".png"),
|
||||||
|
A = love.graphics.newImage("res/img/bone" .. bones .. ".png"),
|
||||||
|
X = love.graphics.newImage("res/img/bone" .. bones .. ".png"),
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
function Ruleset:rotatePiece(inputs, piece, grid, prev_inputs, initial)
|
function Ruleset:rotatePiece(inputs, piece, grid, prev_inputs, initial)
|
||||||
|
Loading…
Reference in New Issue
Block a user