Giter VIP home page Giter VIP logo

schiffeversenken's Introduction

About me

I'm Jonas, usually known under my username @jotoho online and currently a student of computer science at South Westphalia University of Applied Sciences (@fhswf here on GitHub).

Before beginning my studies in September of 2021, I attended a vocational college in Olsberg, Germany for three years where I successfully completed my training to become a "staatlich geprüfter informationstechnischer Assistent" (rough translation: "state certified assistant for information technology").

I have the most experience with the C/C++ and Java programming languages but am also interested in learning more about Kotlin and Rust. Other languages I have worked with before include Python 3 and Lua and I have done a small amount of Android App Development in Java.

Aside from software development, I am also interested in learning more about the operational side of computing. I'm currently operating a beginners homelab comprised of one Raspberry Pi 4 running about a dozen small services in docker containers for personal use.

One of those is my currently very small static website which is generated with some help from the Zola static site generator and hosted using a customized docker container of the Caddy webserver. I hope to add some blog posts to that website in the future, if I come up with interesting ideas.

You can find more of my repositories on my personal Gitea instance.

(I use Arch, btw.) 😉

schiffeversenken's People

Contributors

dependabot[bot] avatar jotoho avatar pfege avatar timbeckmann avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

schiffeversenken's Issues

Investigate compiling with outdated non-standard-compliant c++17 compiler

Unfortunately the virtual machine that the code is supposed to run on has a very old version of g++ installed that doesn't fully support C++17.

In particular the standard library header <charconv> which we use for portable best-practice reading of numbers in strings, does not seem to be present on the WPU.

We may need to place some sort of workaround in place or force ourselves to use inferior code from older standards.

Creation of Issues to cover all requirements of this application

While we have a rough goal ahead of us - the creation of a terminal-based implementation of Battleships (apparently the english name of "Schiffe versenken"), we have yet to divide the project into concrete requirements and neither made any issues to reflect open questions and pending work items.

Hopefully, the process of formulating and discussing on issues will allow us to anticipate possible problems and agree on APIs between different parts of the code so we can more easily work in parallel.

I intend to use this issue as a meta-workitem for this process of splitting the project into actionable issues and a place for general architectural discussion.

Chore: Update clang formatting CI job

This project still uses version 4.4.1, even though 4.5.0 has been out for some time.

Since I'm the one who configured this job and knows the most about CI in our group, I'll handle this task.

Generating a board

Both generating a random but sensical board with no overlapping ships and writing the function(s) needed to output it (collaboration with GUI)

Current requirements for filled grids are impossible

  | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15|
----------------------------------------------------------------
 A|   |   |   |   |   | X |   | X |   | X |   |   |   |   |   |A
----------------------------------------------------------------
 B|   |   |   | X |   | X |   | X |   | X |   | X |   |   |   |B
----------------------------------------------------------------
 C|   |   |   | X |   | X |   | X |   | X |   | X |   |   |   |C
----------------------------------------------------------------
 D|   |   |   | X |   | X |   |   |   | X |   | X |   |   |   |D
----------------------------------------------------------------
 E|   |   |   | X |   | X |   |   |   | X |   | X |   |   |   |E
----------------------------------------------------------------
 F|   |   |   |   |   | X |   |   |   | X |   |   |   |   |   |F
----------------------------------------------------------------
 G|   |   |   |   |   |   |   |   |   |   |   | X | X | X |   |G
----------------------------------------------------------------
 H| X | X | X |   |   |   |   | X |   |   |   |   |   |   |   |H
----------------------------------------------------------------
 I|   |   |   |   |   |   |   | X |   |   |   |   |   |   |   |I
----------------------------------------------------------------
 J| X | X | X | X | X |   |   | X |   |   |   |   |   |   |   |J
----------------------------------------------------------------
 K|   |   |   |   |   |   |   | X |   |   |   |   |   |   |   |K
----------------------------------------------------------------
 L|   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |L
----------------------------------------------------------------
 M|   |   |   |   | X | X | X | X |   |   | X | X | X | X | X |M
----------------------------------------------------------------
 N|   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |N
----------------------------------------------------------------
 O|   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |O
----------------------------------------------------------------
  | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15|

The code works but the constraints placed on it are too tight (maybe impossible).
I can only get it to work if one of the following is done:

  1. Increase grid (board) size
  2. Reduce number and/or sizes of ships
  3. Drop requirement that two ships must not touch each other

Originally posted by @jotoho in #18 (comment)

GUI Output

There should be two functions.

  • clearScreen(): Reset the screen (by invoking system executable "clear")
  • printGameBoard(gamegrid): Output the field in coordinate grid to STDOUT

Update README

Update README with new instructions on usage and compilation.

Since the README was originally authored, lots of things about the project were decided and changed. This means the README can finally be finished.

Create a project README

This project should get a README with (at least):

  • a description of the project
  • how to use
  • build requirements / run requirements (if any)
  • supported systems
  • compilation instructions
  • (copyright information?)

The README should also be in markdown format (README.md) and placed in the root directory of the project repository.

Show ship distribution information on tutorial screen

Currently the only way for players to know how many ships of each size are on the field for themselves and their opponent is to either look it up in the source code or to painstakingly count the amount and sizes of the enemies ships when they are shown.

This is obviously rather user unfriendly, which I wish that the game shows which ships sizes there are and their population on the tutorial screen. The required information can be read from the ShipDistribution configuration.

AI game logic

All the code necessary for the computer to make a somewhat reasonable shot and apply it to the board.

Remove old testing code

The code files in tests/ are not proper unit-tests, already partially broken and are no longer necessary. They served as a way to work with parts of the programs logic before the main game logic and main function were in place but serve no purpose now.

I propose to delete the tests/ directory and all files within. If we ever need them again, they are preserved in git history.

Create Makefile for this project

Once the project is nearing finalization, I should write a Makefile to enable easy and quick compilation on virtually all unix-based Operating Systems.

Move BoardPoint into dedicated files

The struct BoardPoint is quite large and doesn't fully fit into the purpose of fieldinfo.hpp and both it and connected util functions would be better located in their own part of the code.

  • Extract BoardPoint from fieldinfo.hpp into a dedicated cpp file.
  • Create header file and split struct definition from method implementations
  • Move util functions from board-generator.cpp into those files

Add more comments to existing files

During the early phases of development we have focused on functionality at the expense of readability. This should be addressed before delivery.

We intend to add comments while doing a group review of the full project close to the deadline.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.