Design comparison
Solution retrospective
๐ง Hello, I'm Daniel this is my solution for this challenge.
๐ช๐ต๐ฎ๐ ๐ถ ๐๐๐ฒ๐ฑ ๐ป
โข Vanila JS
โข GSAP
๐๐ฏ๐ผ๐๐ ๐๐ต๐ฒ ๐ฐ๐ต๐ฎ๐น๐น๐ฒ๐ป๐ด๐ฒ ๐จโ๐ป
This was an amazing experience for me, I've learned a lot. Additionally, I added the gsap animation to the popup windows. Hope you like my solution to this task!
If you have any suggestions on how I can improve my code then I will be very happy.
Community feedback
- @alex931dPosted 7 months ago
Hello great solution written in vanilla js however i notice some issues both in your codebase and on your site :)
-
Instead of having an long if statement for your cpu you can use something called the minimax algorithm to find the best possible move the minimax algorithm has a tree like structure where it tries all possible moves and gets an score based upon some rules for example you can give it an score if it blocks the player or 2 points for winning the cpu will always try to minimax its own score and minimize the players score. https://en.m.wikipedia.org/wiki/Minimax
-
I notice on phone screen size that the site is not 100vh and i can scroll up and down which I shouldnโt be able to :)
Other then that nice solution :)
Marked as helpful0 -
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord