In search for help, a mentor or a buddy for this project

Project: Small memory card game – how to get from python console to actual game with clickable objects?
Updates:

  • Found hints that object oriented programing may solve my issue.An introduction to Object-Oriented Programming in JavaScript
  • Document object model also may be the solution:JavaScript HTML DOM
    I’ll go into these topics now, maybe I can find a solution
    A few months ago, I coded a small memory game in python for the console. It is a copy of a board game I really like. But I really want to do it with Objects, and best would be Online, so you could play it as a small online minigame. So maybe HTML5 + Javascript. I don’t know. I absolutely don’t know where to start, but I also had some progress with this project. So I really want to finish this project, cause I kind of gave up.

Now I start a second attempt with this. If you know how to code this or you can help me, I would really appreciate it if you would be my mentor or if you could help me with this project. If you don’t know how to code very well but you are interested in this project, I would also like to collaborate as a team on this.

Project details

TL;dr: The game is bascically memory, but you can steal each others cards and you have to throw a dice to find a specific card, so there are no pairs. → at the bottom i described the specific rules of the game, if you are interested.

Now I want to describe my problem:
I coded this game probably very innefficient, but the logic of the game works. The “front end” of the game is really my problem though + how it would work together with the “back end”/logic of the game.

what I tried is:

  1. Coded the game in python as a console game
    0.1 tried coding it in javascript but not finished it
  2. Coded a DIV container, in which are the players cards, the cards in the middle and the cards of player 2
  3. inserted jpg of the back of the card.

What I need is:

  1. How do I now bascially make objects/ the cards
    1.1 Make this card turn if I click on it
    1.2 Make this card go to player 1 deck, if he clicks the right card
    1.3 Make the card “a card”, meaning the cards can change, you would click on a position on the board and the corresponding card would be relevant.

I tried youtube tutorials, where they coded a Javascript memory game, but it just didn’t work out, cause they didn’t really do objects and I couldn’t really apply it to this project. I of course searched stackoverflow etc… but didn’t find a solution how to code these “objects”.

Because of this, I stopped working on it a few months back. Now i want to tackle it again, cause I have more time again. Please help me, I’m completely stuck in this project.

Here is the working python code I have now: Github - Python Code

“Mock up” HTML version, how it should look like: Github - HTML Code

(rules of the game – if you’re interested)
there are 4 forms, and 4 colors. The beginning player begins by throwing 2 dice, 1 for the color and 1 for the form. Then, he needs to find the equivalent card to this dice combination on the board. The Board consists out of 16 cards, which are turned, so you don’t know which card is which. Now you can pick the card as in a memory game. if it’s the correct card, you lay it on to your side. If its the wrong, it goes back to the position on the board, as in a memory game. Now It’s player 2’s turn. He throws the dice, and searches for the equivalent card again. He can also steal player 1’s card. The game is over, if all cards in the middle are picked.
There are a few additional rules like bad cards where you get negativ points, and in some die throws you can pick any color/form, but it’s not relevant to the problem I’m having, so I don’t want to confuse you or steal your time.

Watching something on your screen that looks like a playing card that turns over to show it’s other side isn’t the objects in object oriented programming. Object oriented programming objects are completely in memory. An object is some data with some actions (called methods) that can be performed on that data. I was going to refer you to something unofficially called the platypus book which is every bit as famous as the dragon book but didn’t make it into the movie “Hackers” except that google won’t show it . It only shows whats new. Some library systems still have it. It’ll show you how to set up your objects for the games you want. It’s a book from around 1988 or 1990 it had a blue cover with a platypus on it and mentioned Object Oriented Programming in its short title.

OOPs forgot the rest of your post.
The code
What it does, sample
Yours will look different of course.

1 Like

if you looking for mentor then I’ll highly suggest https://medium.com/@andreineagoie?source=post_page---------------------------

1 Like