Coder Social home page Coder Social logo

xyaneon / xyaneon.games.cards Goto Github PK

View Code? Open in Web Editor NEW
11.0 11.0 6.0 283 KB

A .NET Standard 2.0 library for playing cards (standard and custom), draw piles and shuffling.

License: MIT License

C# 100.00%
c-sharp card card-game cards csharp deck dotnet library net-standard net-standard-2 playing-cards shuffle

xyaneon.games.cards's People

Contributors

claywahlstrom avatar dependabot[bot] avatar github-actions[bot] avatar lizard123137 avatar semantic-release-bot avatar xyaneon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

xyaneon.games.cards's Issues

semantic-release cannot create new releases

For a while now, semantic-release has not been working for this repository, mainly due to apparent token issues despite attempts to fix its setup. Either a working solution should be found or it should be removed (and preferably find a replacement).

The unit tests silently fail to run

I tried to check this on my local machine, but the only output I am getting from the test command (same as on main) is:

  Determining projects to restore...
  All projects are up-to-date for restore.

This is even with trying to deliberately introduce a test failure or skip the restore step, which produces no output at all. This is after reinstalling .NET 6 on my Ubuntu 22.04 laptop with "Mixed state scenario 1" mentioned on dotnet/core#7699 . I do not see the test results in the pipeline either where a clean installation is supposed to be automatically set up, so this might be some .NET bug recently introduced.

At any rate, I would not merge this until the testing issues can be resolved.

Originally posted by @Xyaneon in #41 (comment)

Create sample project using this library

It might be helpful to create a sample project or two showing the basics of using this library. Could be something as simple as a CLI implementation of Go Fish or War.

Something using a custom deck would also work and better illustrate how to effectively subclass the Card class, assuming there is something simple I could implement without having to worry about copyright issues.

Clean up unnecessary comments in unit testing code

The Xyaneon.Games.Cards.Test project contains a lot of comments which are not needed, and could be removed to help shorten the code a bit.

The following can be removed:

  • XML doc comments: The test names should give a clear enough description of what the tests are actually for, and I doubt we would need to generate documentation from test methods.
  • Arrange/Act/Assert comments: The tests should still follow the AAA pattern for readability, but the additional comments calling out each section are a bit redundant and repetitive.

Fix PackageIconUrl warning NU5048

Building the NuGet package for this project outputs a warning like this:

warning NU5048: The 'PackageIconUrl'/'iconUrl' element is deprecated. Consider using the 'PackageIcon'/'icon' 
element instead. Learn more at https://aka.ms/deprecateIconUrl

The provided link suggests also defining PackageIcon and having the icon bundled into the package, with PackageIconUrl left in for backwards compatibility.

Set up continuous deployment (CD)

This package already has continuous integration (CI) set up using Travis CI. See if this can be modified to also do continuous deployment (CD).

1.1.0 GitHub Release is missing package files

The *.nupkg and *.snupkg files were part of the GitHub Release for versions 1.0.0 and previous as attached assets, but they are missing for the 1.1.0 release. They were at least uploaded to NuGet by the CD pipeline, however.

The GitHub Release will need these packages to be manually added, and some troubleshooting will be needed to figure out why these were skipped this time around.

Is there a particular reason that cards are an abstract class?

Hello!

I get that decks are supposed to contain the concept of a card, (like a traditional playing card) but does it need to be an abstract class? The reason I ask this is because it can cause a few issues if someone has already defined their own objects that need to inherit from some other base class (Such as a GameObject), then they can't use this library very easily.

There's two thoughts I have for fixing this (And to keep from breaking changes, even). The first is to add an interface such as ICard, and have your abstract class inherit from ICard, and change the shuffling algorithm to use where TCard : ICard, then a person could add the ICard interface to any object they want easily.

Or Option 2, why specify that it needs to inherit from anything at all? A deck doesn't have to be cards. (Anything could be shuffled, really, like songs). It seems that the underlying data structure it accepts is just IEnumerable, just let people use any objects with this interface?

I appreciate your thoughts on the matter.

Investigate using Semantic Release to automate releases

This should include the following:

  • Should be done using GitHub Actions, so the Travis CI files can be finally removed per #21
  • Should create a new GitHub Release following Semantic Versioning
  • Should publish a new NuGet package to nuget.org (and optionally to GitHub Packages)

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.