Skip to content

Commit

Permalink
Rename python files
Browse files Browse the repository at this point in the history
  • Loading branch information
George-lewis committed Dec 5, 2019
1 parent 1a1aa1b commit 0fc8b6e
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 5 deletions.
15 changes: 15 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Dreadnought",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal"
}
]
}
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# CSC290: Battleship
See the [Project Plan](project-plan.md)
# DreadNought - Readme

[toc]

## Screenshots



## Introduction

**DreadNought** is a game based upon well-known classic game of **[Battleship](https://en.wikipedia.org/wiki/Battleship)**. In this two-player game you place *ships* of varying lengths onto a grid of 10x10 tiles. In this game each player is not allowed to see the other player's board, instead the players take turns firing *missiles* onto the opponents board and are told if they hit a ship or not. ***The objective of the game*** is to sink all of your opponents ships, at which point you have won.
8 changes: 6 additions & 2 deletions src/gui/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,19 @@
from gui.guiboard import guiboard
from enum import Enum
from model.Controller import controller
import pathlib

def relative(fn):
return pathlib.Path(__file__).parent / 'my_file'

class App:

instance = None

fill_color = (255, 255, 255) # RGB white

background = pygame.image.load('resources/background.jpg')
title = pygame.image.load('resources/title.png')
background = pygame.image.load(relative('resources/background.jpg'))
title = pygame.image.load(relative('resources/title.png'))

arial = pygame.font.SysFont("Arial", 30)

Expand Down
2 changes: 1 addition & 1 deletion src/gui/button.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import pygame, gui.app
import pygame, app
from collections import namedtuple

Style = namedtuple("Style", "bg hbg tcolor")
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 0fc8b6e

Please sign in to comment.