Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
cc1c1f0
Setting up GitHub Classroom Feedback
github-classroom[bot] Oct 4, 2022
f756305
very good
SukonlawatCh Oct 4, 2022
af7dfc8
feat: initialize event branch.
yothgewalt Oct 4, 2022
dbdab1f
feat: initialize keyboard branch
yothgewalt Oct 4, 2022
75b24c4
Merge pull request #2 from FITM-KMUTNB/event
yothgewalt Oct 4, 2022
63c5cfb
Merge pull request #3 from FITM-KMUTNB/keyboard
yothgewalt Oct 4, 2022
6f5cfe0
feat: event action.
yothgewalt Oct 4, 2022
ab04478
feat: keyboard checker
yothgewalt Oct 4, 2022
83c7611
Merge pull request #4 from FITM-KMUTNB/event
yothgewalt Oct 4, 2022
6cd21f0
Merge pull request #5 from FITM-KMUTNB/keyboard
yothgewalt Oct 4, 2022
29f39f9
feat: keyboard event
yothgewalt Oct 4, 2022
65ec248
Merge pull request #6 from FITM-KMUTNB/keyboard-event
yothgewalt Oct 4, 2022
e04f893
feat: add more score
yothgewalt Oct 4, 2022
2a4f783
Merge pull request #7 from FITM-KMUTNB/event-action
yothgewalt Oct 4, 2022
504f527
feat: add update_list()
yothgewalt Oct 4, 2022
fdebb94
Merge pull request #8 from FITM-KMUTNB/event-action
yothgewalt Oct 4, 2022
7aa5b10
fixes
yothgewalt Oct 4, 2022
5790aef
fixes
yothgewalt Oct 4, 2022
c870825
fix
yothgewalt Oct 4, 2022
7c9953f
feat: add wrong score
yothgewalt Oct 4, 2022
a59f302
Merge pull request #9 from FITM-KMUTNB/event-action
yothgewalt Oct 4, 2022
b55ba76
feat: add more score
yothgewalt Oct 4, 2022
21dd969
Merge pull request #10 from FITM-KMUTNB/keyboard-event
yothgewalt Oct 4, 2022
6b0b51a
feat: created a new file for keyboard event
yothgewalt Oct 4, 2022
ee12629
Merge pull request #11 from FITM-KMUTNB/keyboard-event
yothgewalt Oct 4, 2022
4493686
Delete keyboard.py
yothgewalt Oct 4, 2022
d89a090
update
KMUTNB-Chanakan Oct 4, 2022
c8a10e5
update
KMUTNB-Chanakan Oct 4, 2022
9762a8c
Merge pull request #12 from FITM-KMUTNB/likesxxzz2
yothgewalt Oct 4, 2022
57fcb9b
rebase: added .gitignore
yothgewalt Oct 4, 2022
bd97a33
operation: delete FULL_SCREEN.py
yothgewalt Oct 4, 2022
30c0c35
main: added pygame base and requirements.txt
yothgewalt Oct 4, 2022
a9365c1
main: added mixer for music.
yothgewalt Oct 4, 2022
7c3a955
main: added classes for pygame and change new music background.
yothgewalt Oct 4, 2022
71f621a
setup: added two libraries for python project.
yothgewalt Oct 4, 2022
be249ec
main: updates to currently packages.
yothgewalt Oct 5, 2022
aa6500b
main: added theme provider and set button to center align.
yothgewalt Oct 5, 2022
a7c5384
update
KMUTNB-Chanakan Oct 6, 2022
12e2e67
update
KMUTNB-Chanakan Oct 6, 2022
c0b4660
Merge pull request #14 from FITM-KMUTNB/Edit_Fonts
yothgewalt Oct 6, 2022
4684374
deleted all.
yothgewalt Oct 20, 2022
3df4b88
project: pygame has been updated.
yothgewalt Oct 20, 2022
e350dd9
project: added .gitignore for ignore some file that not expect.
yothgewalt Oct 20, 2022
015987e
project: added README.md for Documentation the project.
yothgewalt Oct 20, 2022
aa0a3aa
project: big updates from author.
yothgewalt Oct 24, 2022
21a433e
project: big updates, fix bug music audio and added mixer channel.
yothgewalt Oct 24, 2022
1728301
project: added scoreboard.txt
yothgewalt Oct 24, 2022
0ef751d
:fire: hotfixes: ui-image has black background but we used png !?
yothgewalt Oct 25, 2022
129eb66
component: project has been updated.
yothgewalt Nov 2, 2022
19af9f5
group: project has been updated.
yothgewalt Nov 2, 2022
a7020c2
group: project has been updated.
yothgewalt Nov 3, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.DS_Store
.vscode/*
14 changes: 14 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
pygame = "*"
pygame-gui = "*"

[dev-packages]
autopep8 = "*"

[requires]
python_version = "3.9"
124 changes: 124 additions & 0 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

57 changes: 0 additions & 57 deletions Project.py

This file was deleted.

63 changes: 60 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,60 @@
[![Open in Visual Studio Code](https://classroom.github.com/assets/open-in-vscode-c66648af7eb3fe8bc4f294546bfd86ef473780cde1dea487d3c4ff354943c9ae.svg)](https://classroom.github.com/online_ide?assignment_repo_id=8765555&assignment_repo_type=AssignmentRepo)
# PythonProjectTmp
ProjectTemplate
<p align="center">
<a href="https://github.com/FITM-KMUTNB">
<picture>
<img src="packages/sunshine_typing.png" height="128">
</picture>
<h1 align="center">✨ Sunshine Typing by Component Team</h1>
</a>
</p>

## ✏️ Who we are?

We are students of King Mongkut's University of Technology North Bangkok working together on a group project on a computer programming class.

## 📣 What is the project about?

Typing test project, which requires python to create, which the instructor suggested using pygame for this project.

## 📦 What are the libraries in the project?

- pygame (latest) -> no specific version
- pygame_gui (latest) -> no specific version

These libraries are managed with **pipenv** to make them easier to run in different environments and our project is using python version **3.9**

## ⚗️ How to open the program?

First of all, you need to contact pipenv to manage the environment, where you can see how to install it [here](https://pypi.org/project/pipenv/).

After installation you need to go into the source code folder first after typing the command.

```
pipenv shell
pipenv install
```

After typing the above two commands, you can run the game with commands via script.

**If you're running macOS or Linux**

```
chmod +x ./run.sh
./run.sh
```

**If you're running Windows**

```
You can click on **run.bat** to open the program.
or
.\run.bat
```

## 🔨 Authors

- Yongyuth Chuankhuntod **(Python Developer & Lead Team)**
- Sukonlawat Choolert **(Graphic Designer)**
- Pornthawan Khumphai **(Graphic Designer)**
- Pawat Narkjuathong **(Composer)**
- Chanakan Toursupap **(Composer)**
- Jirapong Chanthaleka **(Composer)**
12 changes: 12 additions & 0 deletions __tests__/accuracy_and_wpm.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import time

timer = time.time()

print(timer)
time.sleep(7.64)

total_timer = time.time() - timer
print(total_timer)

words_per_minute = (len("Every beginning has an end") * 60) / (5 * total_timer)
print(words_per_minute)
Binary file added packages/sunshine_typing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions run.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python source/__main__.py
3 changes: 3 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

python3 source/__main__.py
10 changes: 10 additions & 0 deletions sentences.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
A farmer was farming and he found a valuable treasure box that changed his life.
There was an epidemic in our cattle farm and now we need a lot of veterinarians.
Legend has it that there was a monster from another dimension with a very formidable.
The seeds found in the Sacred Grove are usually high-yielding seeds that never die.
Ender Dragons are powerful creatures and possess many treasures which is our goal.
Such powerful weapons always had a cruel and divine history that made people want.
Honest pets are usually dogs or cats, but you said taming a dragon was impossible.
A valuable treasure known as the Ender's Box is extremely rare in the magical world.
You can become a conqueror if you train enough to fight dragons which is difficult.
Magic is powerful, but if used improperly, it can overwhelm the user with dark energy.
21 changes: 21 additions & 0 deletions source/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from app.configurations import configure
from app import program
from pygame.locals import *

import os


configure.WINDOW_NAME = 'Sunshine Typing By Component Team'
configure.WINDOW_RECT = Rect(0, 0, 1280, 720)
configure.GAME_THEME_PATH = os.getcwd() + '/source/app/data/themes/default_theme.json'
configure.SENTENCES_PATH = os.getcwd() + '/sentences.txt'
configure.ENABLED_SCROLLING_BACKGROUND = False


if __name__ == '__main__':
bootstrap = program.Typing(
display_title=configure.WINDOW_NAME,
rect=configure.WINDOW_RECT,
theme=configure.GAME_THEME_PATH,
scrolling_background=configure.ENABLED_SCROLLING_BACKGROUND
).run()
File renamed without changes.
Binary file added source/app/__pycache__/__init__.cpython-310.pyc
Binary file not shown.
Binary file added source/app/__pycache__/engine.cpython-310.pyc
Binary file not shown.
Binary file added source/app/__pycache__/program.cpython-310.pyc
Binary file not shown.
Empty file added source/app/assets/__init__.py
Empty file.
Binary file added source/app/assets/audio/effect/click.ogg
Binary file not shown.
Binary file added source/app/assets/audio/giga_chad.ogg
Binary file not shown.
Empty file.
Binary file added source/app/assets/image/back.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/app/assets/image/back_hovered.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/app/assets/image/background.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/app/assets/image/core_background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/app/assets/image/entry_name_background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/app/assets/image/exit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/app/assets/image/exit_hovered.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/app/assets/image/menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/app/assets/image/menu_hovered.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/app/assets/image/name_label.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/app/assets/image/play.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/app/assets/image/play_hovered.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/app/assets/image/prepare_background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/app/assets/image/restart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/app/assets/image/restart_hovered.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/app/assets/image/scoreboard_sign.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/app/assets/image/sound_close.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/app/assets/image/sound_close_hovered.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/app/assets/image/sound_open.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/app/assets/image/sound_open_hovered.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/app/assets/image/start.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/app/assets/image/start_hovered.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/app/assets/image/sunshine_typing_logo.png
Binary file added source/app/assets/image/window_icon.png
Empty file added source/app/classes/__init__.py
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading