Les membres ayant 30 points peuvent parler sur les canaux annonces, projets et hs du chat.
La shoutbox n'est pas chargée par défaut pour des raisons de performances. Cliquez pour charger.

Forum Casio - Projets de programmation


Index du Forum » Projets de programmation » Sudoku in python
Potchkee Hors ligne Membre Points: 25 Défis: 0 Message

Sudoku in python

Posté le 28/03/2025 02:54

As my first python program I decided to make Sudoku.

Here's the link
It's really not bad though IMHO- I'm a bit of a perfectionist. It has a nice interface and even a custom small number font. The code is probably not very pythonic or optimized though. I also had to keep it under 300 lines so I could use the Casio python script editor.

Of course this would not have been possible without ExtraPython, so thank you to everyone involved in that! The game can only run on the ExtraPython add-in.

Unfortunately there are no screenshots as I don't know how to build/run the emulator. Maybe someone else can take a few ss/gif?

For this version there are no save states, 4 difficulties, and a limited amount of games available. Lephe tells me support for file read/write will hopefully be added to EP in the near future, and then I can add save states and 100s of games.

Also possibly on the agenda for the future is a reveal/reveal all option. Let me know what you think, because I'm unsure if that's even a positive feature.

If you have any other features requests/comments please let me know!


Potchkee Hors ligne Membre Points: 25 Défis: 0 Message

Citer : Posté le 28/03/2025 23:53 | #


I realized the first file didn't work in the latest PE, so I updated it. It should work now (but note it will not work on PE 0.2.0 only the latest 0.3.0).
Tuper4 Hors ligne Membre Points: 1022 Défis: 26 Message

Citer : Posté le 29/03/2025 08:43 | #


HI!
I saw your project and I must say that a Sudoku in less than 300 lines is impressive. I wanted to do give you screenshots of your project using PyGint but I just realized that it's your program is for CG calculators and not FX... So I'll be working on a CG version of PyGint and i'll hopefully be able to send you screenshots

Unfortuneatly, I don't think that there is any other alternatives to emulating python programs. While Heath's emulator does exist, it doesn't emulate memory so that wouldn't work. But I might be totally wrong though, there might be some ways to do it.
Je fais que de confondre Noël et Halloween
Par ce que Oct 31= Dec 25
Lephenixnoir En ligne Administrateur Points: 24966 Défis: 174 Message

Citer : Posté le 29/03/2025 08:49 | #


I'll check this out. You can take USB screenshots and video captures in PythonExtra with the dev build. Looks like this needs to be a release feature.
Mon graphe (28 Janvier): (MPM ; serial gint ; (Rogue Life || HH2) ; PythonExtra ; ? ; Boson X ; passe gint 3 ; ...) || (shoutbox v5 ; v5)
Slyvtt Hors ligne Maître du Puzzle Points: 2521 Défis: 17 Message

Citer : Posté le 29/03/2025 08:50 | #


Potchkee a écrit :
I realized the first file didn't work in the latest PE, so I updated it. It should work now (but note it will not work on PE 0.2.0 only the latest 0.3.0).


Hi Potchkee,
with Lephe we always try to get ascending compatibility and I am quite surprised to read that you had a former version of Sudoku running on PE0.2.0 but not on PE0.3.0.
It would be great if you could share with us what was not working.

Seems that now it is the opposite, the latest version runs on PE0.3.0 but not anymore on 0.2.0 ? Am I correct ? So please let us know what are the issues, will try to check what's going on as we have a new version in preparation.
BR
Sly
There are only 10 types of people in the world: Those who understand binary, and those who don't ...
Potchkee Hors ligne Membre Points: 25 Défis: 0 Message

Citer : Posté le 30/03/2025 03:17 | #


Hey
Slyvtt a écrit :
Potchkee a écrit :
I realized the first file didn't work in the latest PE, so I updated it. It should work now (but note it will not work on PE 0.2.0 only the latest 0.3.0).


Hi Potchkee,
with Lephe we always try to get ascending compatibility and I am quite surprised to read that you had a former version of Sudoku running on PE0.2.0 but not on PE0.3.0.
It would be great if you could share with us what was not working.

Seems that now it is the opposite, the latest version runs on PE0.3.0 but not anymore on 0.2.0 ? Am I correct ? So please let us know what are the issues, will try to check what's going on as we have a new version in preparation.
BR
Sly

It was a problem with the getkey_opt function in gint- in pe 2.0 it doesn't have a parameter for waiting before returning EV_NONE, while in 3.0 that parameter does exist, and all I changed was setting it to None.

By the way, I realized I forgot to remove a line of code I added for testing that goes to the win screen if you hit '5' in certain circumstances, so I'm about to upload a new file fixing that. By the time anyone reads this it should be fixed.
Potchkee Hors ligne Membre Points: 25 Défis: 0 Message

Citer : Posté le 01/04/2025 09:22 | #


Update: more modern look with rounded rectangles, a dark mode and legacy option, an 'about' and 'controls' page, and smooth drawing mechanics. I still needed to keep it under 300 lines so good luck to anyone trying to read the code...

LienAjouter une imageAjouter une vidéoAjouter un lien vers un profilAjouter du codeCiterAjouter un spoiler(texte affichable/masquable par un clic)Ajouter une barre de progressionItaliqueGrasSoulignéAfficher du texte barréCentréJustifiéPlus petitPlus grandPlus de smileys !
Cliquez pour épingler Cliquez pour détacher Cliquez pour fermer
Alignement de l'image: Redimensionnement de l'image (en pixel):
Afficher la liste des membres
:bow: :cool: :good: :love: ^^
:omg: :fusil: :aie: :argh: :mdr:
:boulet2: :thx: :champ: :whistle: :bounce:
valider
 :)  ;)  :D  :p
 :lol:  8)  :(  :@
 0_0  :oops:  :grr:  :E
 :O  :sry:  :mmm:  :waza:
 :'(  :here:  ^^  >:)

Σ π θ ± α β γ δ Δ σ λ
Veuillez donner la réponse en chiffre
Vous devez activer le Javascript dans votre navigateur pour pouvoir valider ce formulaire.

Si vous n'avez pas volontairement désactivé cette fonctionnalité de votre navigateur, il s'agit probablement d'un bug : contactez l'équipe de Planète Casio.

Planète Casio v4.3 © créé par Neuronix et Muelsaco 2004 - 2025 | Il y a 127 connectés | Nous contacter | Qui sommes-nous ? | Licences et remerciements

Planète Casio est un site communautaire non affilié à Casio. Toute reproduction de Planète Casio, même partielle, est interdite.
Les programmes et autres publications présentes sur Planète Casio restent la propriété de leurs auteurs et peuvent être soumis à des licences ou copyrights.
CASIO est une marque déposée par CASIO Computer Co., Ltd