GithubHelp home page GithubHelp logo

Comments (12)

jonasrk avatar jonasrk commented on May 28, 2024 1

If I see some examples for unit tests, maybe I can also help with adding a few. :) Having some unexpected freetime. ;)

from openviii-monogame.

FlameHorizon avatar FlameHorizon commented on May 28, 2024 1

Today’s update (mostly to clear my head) - I started working on test cases for Core/Saves/Damageable.cs and Core/Battle/Enemies/Enemy.cs which inheritances from Damageable. And oh boy, the dependencies are really. Although I’ve managed to write a few test cases for public bool Damageable.ChangeHP(int dmg). I hope either tomorrow or on Saturday Sunday I will have some to show.

from openviii-monogame.

FlameHorizon avatar FlameHorizon commented on May 28, 2024 1

Great effort! I will start writing today.

from openviii-monogame.

Sebanisu avatar Sebanisu commented on May 28, 2024

Someone tried to add unit tests. Though I donno how to use them.

from openviii-monogame.

FlameHorizon avatar FlameHorizon commented on May 28, 2024

Today I’ve slowly started making some non-breaking changes in #163 . This will help me to understand project and people who are working on it better.

To the owners - can I help you in any ways implement a coding convention for this project?

from openviii-monogame.

Sebanisu avatar Sebanisu commented on May 28, 2024

I had been using reshaper and codemaid to try to clean up some code the last few weeks. I haven't committed to master yet. I'm not sure if there is a way to define the conventions. Though reshaper has some default ones I was using. I like reshaper because I load a file and everything is highlighted like spelling errors and things that don't follow the naming convention. So then I just need to go through the file and make it happy. So then I get a green checkmark. Codemaid just sorts everything and groups the methods, fields, properties, etc. I'm kinda a noob. I know like c++ has a clang tidy file. I don't know if something like that exists for c#.

from openviii-monogame.

FlameHorizon avatar FlameHorizon commented on May 28, 2024

I've moved discussion about coding style to a separate issue #165

from openviii-monogame.

FlameHorizon avatar FlameHorizon commented on May 28, 2024

Update. Now, with this recent PR, it is even harder...

from openviii-monogame.

Sebanisu avatar Sebanisu commented on May 28, 2024

harder to test?

from openviii-monogame.

FlameHorizon avatar FlameHorizon commented on May 28, 2024

Is there a reason why do you have a static CreateInstance methods with private or protected constructors?

A lot of classes (like Saves.CharacterData) are contected with global static class Memory .

Class Saves.CharacterData contains information about character's data as well as operations on binary data. Probably there are just too many things which are happening in one place.

from openviii-monogame.

Sebanisu avatar Sebanisu commented on May 28, 2024

I am told new keywords should be hidden behind a factory method. https://refactoring.guru/design-patterns/factory-method/csharp/example

Though maybe I just did a poor job at implementation.

from openviii-monogame.

Sebanisu avatar Sebanisu commented on May 28, 2024

Only should be two ways to make a character data instance. Loading a save or reading init.out. Enemy data stored in enemy dat files so they're loaded at the start of battle. You could have the test run after loading init.out or just feed the code random binary data and it will break and throw errors. Maybe we could break the monolith class into smaller sub classes. I was wondering if we should get rid of the damageable abstract class. It's job could be handled by an interface. I wanted to have atb and hp functions universal between the entities.

from openviii-monogame.

Related Issues (20)

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.