Did some changes:
1. Moved sudoku.lua to the root 2. Create Makefule 3. Add love binaries in `static-binaries` (they are not static yet) 4. Worked on fullscreen mode. (WIP)
This commit is contained in:
		
							parent
							
								
									851cf2ff95
								
							
						
					
					
						commit
						9e7481f75b
					
				
							
								
								
									
										14
									
								
								Makefile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								Makefile
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,14 @@ | |||||||
|  | .PHONY: run | ||||||
|  | run: | ||||||
|  | 	@love . | ||||||
|  | 
 | ||||||
|  | .PHONY: build | ||||||
|  | build: | ||||||
|  | 	@zip -9 -r /tmp/Sudoku.love . -x '*.git*' | ||||||
|  | 	@mkdir -p build | ||||||
|  | 	@mv /tmp/Sudoku.love build | ||||||
|  | 	@cat static-binaries/love-arm64 build/Sudoku.love > build/sudoku-arm64 | ||||||
|  | 	@chmod +x build/sudoku-arm64 | ||||||
|  | 	@cat static-binaries/love-amd64 build/Sudoku.love > build/sudoku-amd64 | ||||||
|  | 	@chmod +x build/sudoku-amd64 | ||||||
|  | 
 | ||||||
							
								
								
									
										8
									
								
								main.lua
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								main.lua
									
									
									
									
									
								
							| @ -1,4 +1,4 @@ | |||||||
| sudoku = require "sudoku.sudoku" | sudoku = require "sudoku" | ||||||
| uiUtils = require "ui.utils" | uiUtils = require "ui.utils" | ||||||
| config = require "config" | config = require "config" | ||||||
| SudokuCanvas = require "ui.sudokucanvas" | SudokuCanvas = require "ui.sudokucanvas" | ||||||
| @ -7,12 +7,16 @@ board = {} | |||||||
| 
 | 
 | ||||||
| function love.load() | function love.load() | ||||||
|     love.window.setTitle("Sudoku!") |     love.window.setTitle("Sudoku!") | ||||||
|  |     love.window.fullscreen = true | ||||||
|  | 
 | ||||||
|     love.window.setMode(0, 0) |     love.window.setMode(0, 0) | ||||||
|     love.mouse.setGrabbed(false) |     love.mouse.setGrabbed(false) | ||||||
|     love.keyboard.setKeyRepeat(true) |     love.keyboard.setKeyRepeat(true) | ||||||
|     math.randomseed(os.time()) |     math.randomseed(os.time()) | ||||||
|     board = sudoku.loadBoard(config.board.filePath) |     board = sudoku.loadBoard(config.board.filePath) | ||||||
|     local width, height = love.graphics.getDimensions() |     -- local width, height = love.graphics.getDimensions() | ||||||
|  |     local width, height = love.window.getDesktopDimensions() | ||||||
|  |     love.window.setMode(width, height, {fullscreen = true}) | ||||||
|     sudokuCanvas = SudokuCanvas:new(500, 50, height/1.1, config.SudokuCanvas) |     sudokuCanvas = SudokuCanvas:new(500, 50, height/1.1, config.SudokuCanvas) | ||||||
|     sudokuCanvas:setBoard(board[1]) |     sudokuCanvas:setBoard(board[1]) | ||||||
|     myFont = love.graphics.newFont(24) |     myFont = love.graphics.newFont(24) | ||||||
|  | |||||||
							
								
								
									
										
											BIN
										
									
								
								static-binaries/love-amd64
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								static-binaries/love-amd64
									
									
									
									
									
										Executable file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								static-binaries/love-arm64
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								static-binaries/love-arm64
									
									
									
									
									
										Executable file
									
								
							
										
											Binary file not shown.
										
									
								
							| @ -55,7 +55,7 @@ function loadBoard(fn) | |||||||
|     local boards = {} |     local boards = {} | ||||||
|     local r = 0 |     local r = 0 | ||||||
|     local board = {} |     local board = {} | ||||||
|     for line in io.lines(fn) do |     for line in love.filesystem.lines(fn) do | ||||||
|         if line:gsub("%s+", "") == "" then |         if line:gsub("%s+", "") == "" then | ||||||
|             table.insert(boards, board) |             table.insert(boards, board) | ||||||
|             board = {} |             board = {} | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user