Skip to content

Commit

Permalink
Make main game class
Browse files Browse the repository at this point in the history
  • Loading branch information
jaroshevskii committed Nov 11, 2022
1 parent 55ce77c commit a352e9c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
6 changes: 6 additions & 0 deletions Sources/Snake/Game.swift → Sources/Snake/SnakeGame.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import Raylib

@main
class Game {
private var field: Field
private var snake: Snake
Expand Down Expand Up @@ -200,4 +201,9 @@ class Game {
draw()
}
}

static func main() {
let snakeGame = Game(settings: .default)
snakeGame.run()
}
}
7 changes: 0 additions & 7 deletions Sources/Snake/main.swift

This file was deleted.

0 comments on commit a352e9c

Please sign in to comment.