Tag Archives: #PROJECT

The Final Project. #PROJECT #TC1017

It’s been a hard week for us, we started the project 4 days ago after we finished all of our tasks since the past week, (Finishing the final proyect of mathematics and all the other stuff of this course). Manuel and I started with some help (a lot) of a friend of his (his roomie who is having classes with you but in the other c++ course), he practically told us everything about installing ubuntu and the magick++ library. This week i surely learned how to use matrixes (Thing i didn’t know before not until this project). So we think this program works, we did final modifications earlier (we didnt have time to prove them, but the last time we proved it, it worked) sorry for the delay, thanks.

Here’s the code: https://github.com/kenwbauer/TC101F15_Team20/blob/master/finalproject.cpp

MASTER SUDOKU

1017

First of all here is the link to our project (mauricio and mine) the super sudoku:

https://github.com/kenwbauer/DiegoMauricio/blob/master/project.cpp

It was a very hard proyect, mainly because there are so many things to do from the school and tournments and trainings and all that stuff. The easiest part of the project was making the body of the sudoku, the lines and all that stuff. We suffered a lot or at least i suffered a lot in the project because I doesnt understand vectors, so i need to look for information and practice to finally finish it. Hope you like it.

Proyecto final

Proyecto final

Enlace: Proyecto final

1017  

Sudoku Project

Working on the sudoku project made me learn how to manipulate Arrays in many different ways. It also taught me how to solve big projects and turn them into simple day to day tasks that over time will be completed and better than a rushed project! 

My teammate Asa is a really cool dude, i mean he’s barely 16 and in college that really freaking amazing! Hope he sees this posts and notices that he’s going to be someone in the future! Teamwork is the best thing that could ever be invented.

Anyway here is our sudoku code:

https://github.com/AsaPuls/JuanFransicoAsa/blob/patch-2/Almost%20finished%20code

1017

Final Project: Sudoku

Well to start this project was complicated,
at first I thought that i will be imposible to finish it,
but then we start asking to our teammates or the teacher how to do it,
it helps a lot and the things get better but i took a lot to finish it on time .
But I think this will be useful for the final exam.

the link:
https://github.com/kenwbauer/IvannaJoseEduardo/blob/master/sudoku.cpp

SUDOKU 1017

#PROJECT

Finally! Here is my post for our final project which I did with Rodrigo Hernández. We spent a couple of weeks tryting to figure it out, but we finally make it.

About my experience doing this project i can say it wasn´t easy, and we spent a lot of time trying to figure out how we will do it. At first before start programming, we decide to think about how does it have to work or how we can do it work. After that, we think about how we can express our ideas in code.

Being honest thakns to Rodrigo we made the vectors work correctly but the two of us aport ideas of how could it work. We started by doing the cout´s where you ask the user what would he like to do, like if he want to print board, print instructions, write, erase, print history or  quit.

At first we just did by asking the user what row, column, and number he want to write or in what row and column want to erase and for him to put a number between 1 and 9. Also that the user couldn´t erase original numbers. Then we started with the hard stuff.

Doing the code for the program to check if there was an equal number in row, column or quadrant was the hardest part. We begin by doing a fuction which check in which quadrant were you, we did a bunch un if´s which check if the number  you put were in the row 0 to 2 and column 0 to 2 and that meant it was in the first one, and we did that with all the quadrants.

After we define in what quadrant you are it will check if in the column or in the row was an equal number you want to put.

The tricky part was checking the quadrtant, we did a nest for loop which checked was by making a first index in column and row and a final index in row and column depending in the quadran yo were, so we made the for loop to check to the first index to the last one and then to pass to the other row and etc.

After we managed with the help of Ken, we just change a couple of things to make our code easier, like checking the originals by using negative numbers and absoult numbers, then we put the  colors in the board and finally putting the history and instructions.

I really enjoyed doing this project because it help me understand things i didn´t like vectors, and because of the practice.

I really liked also this class and the way of Ken teaching, with flipped learning. Flipped learning teach me to the things by my own, and investigate things i don´t understand and donpt wait to have a class to understand it. It make you independent and teach you to get over the obstacles.

Feel free to use our code and play with it!

I´m proud to give you mi Github link for my final project:

https://github.com/kenwbauer/RodrigoJuanCarlos/blob/master/sudokuRoJc.cpp

 

Sudoku – Final project C++

1017

Sudoku - Final project C++

Hi! This blog post is about make a review of all the work realized on the project in the last weeks of commits on GitHub, write, save compile and run code…

 

I’ll explain to you how I found information to help me to do this stuff, so, besides to go of the teacher’s office and search in google, I asked also to some friends (Jose Luís, Osvaldo, Fernando). And how’s work with my partner Ale.

The first week working in the project was kind of hard because I didn’t undertand the base code very well, so the first thing that I did was to write the “about sudoku” and “rules” functions because those are the easiest ones. Then, I went to the Ken`s office to ask about what does each function without the two that Ale wrote. After that, I started to write the “writenumbers” function asking to the user the line and the column where he/she wants to write the number of him/her choice (between 1 to 9). Inside this function I called two more functions; 1 to check line and column and the second to check each 3×3 grid. After we have that end, Ale added some colours to the menu options and I did it with the board making the original numbers in red, the 0’s in the normal colour and the user numbers in green as is especified on the page of sudoku. The last thing that I did was the “restartsudoku” function (it is asked by ken as well).

Working with Ale is… I don’t know, I think that she needs to have initiative and to know what is what we need to do and make a mentality that we need to do only the things that it is asked. In general was good because she got done everything that she has to do and when I did changes she inmediatly was asking me about how the changes works.

 

Finally:

This is the link to my code at Github.

Sudoku Final Project

This is my final post, and it’s about my sudoku program

At the beggining, I fount it kind of impossible to finish, because the code scared the s#%t out of me, but it was not at hard as it is.

We just needed a little help of friends and of course the teachers help in order to understand this thing and make it work.

I’m not gonna lie, it took us a lot of time, most of it founding where was the damn problem at the time to compile it, but it was a very nice experience.

So that was it, this might be my last post so I will leave this image down below to remenber that we all are like ninjas, and also because, well sudoku dude.

Ninja banana forever !!!

Link to my code

1017

#PROJECT

Primeramente lo que hicimos fue investigar y ver como se resolvía un Sudoku, lo más importantes del Sudoku es que no se repitan los números tanto en filas, columnas y dentro del mismo cuadrante, los números permitidos son del 1 al 9 solamente y el usuario gana cuando haya acomodado estos números dentro de TODOS los cuadrantes con la condición de que no se repitan de ninguna manera en filas, columnas y cuadrantes.

Primero lo que hicimos fue identificar como checar que no se repita el número que ingresas de forma horizontal (fila) y para esto utilizamos una función INT donde usamos un FOR para que cheque los valores en Y, dentro de este FOR utilizamos condicionales para que primero cheque si hay un número o no, si no lo hay pues no checa nada, si hay algún numero empieza a checar que ese número no se repita con otros que ya estén, si es así y se repite, entonces el juego no nos dejará ganar. Usamos esos números o posiciones para checar que si ninguno se repite, entonces guarda este resultado para después usarlo en la función que nos hará ganar.

Después hicimos lo mismo básicamente pero cambiando los parámetros de nuestro sudoku para que en lugar de checar horizontal, cheque los números de forma vertical; es básicamente lo mismo porque de igual manera solo puede estar el número “1” una sola vez, y así para los otros 8 números restantes, de igual manera cuando la condición de que no se repitan los números se cumpla, se registrará que no se repiten y de esta manera el programa nos dejará ganar.

Para checar que en cada cuadrante no se repita ningún número del 1 al 9, usamos de la misma manera una función tipo INT con 4 parámetros para que cheque que ningún número de los ingresados se repita. Usamos un doble FOR para que este cheque cuadrantes, los cuales en el INT MAIN cambiamos parámetros para que cheque por ejemplo el primer cuadrante, después con el cambio de esos parámetro checar el segundo cuadrante y así sucesivamente. Esto es de lo que más nos costó trabajo desarrollar en forma de código porque es difícil idear como el programa tiene que correr para que cheque todos y cada uno de los cuadrantes. Una vez que sabes y tienes en mente como desarrollarlo con FOR, ya lo demás es fácil y simplemente trata de escribir el código.

Para que el usuario al iniciar el juego, vea y conozca las reglas, usamos una función VOID para que no nos regrese nada pero imprima lo que pongamos en el COUT y ahí mismo el usuario solamente va a leer lo que aparezca en la pantalla.

También usamos una función INT que nos checa la celda en la que queremos introducir un número para ver que haya espacio, si ya existe algún número en ese espacio, el programa a la hora de querer ingresar X número, nos dirá que ese espacio no es válido, que intentemos de nuevo. Para esto simplemente usamos un condicional que checa que si hay una X en ese espacio, nos va a dejar sustituirlo por un número, si no, nos dirá que intentemos con otra celda.

Por último utilizamos una función INT llamada borrar, que lo que hace es checar nuestro plano, nuestro Sudoku y checa que haya algún número (de igual forma con un condicional IF), si hay un número lo que va a hacer es darle un valor de 0 para que el programa después nos lo imprima como X, si no hay un número nos dirá que intentemos de nuevo, y de igual forma, si queremos borrar un número base que ya ESTA ESTABLECIDO, nos dirá el programa que ese número no puede ser modificado.

Por último hicimos el INT MAIN que básicamente corre y toma todas las funciones anteriormente realizadas, y declaramos variables tipo CHAR, INT y STRINGS; por otra parte utilizamos un archivo base en el que ya hay número establecidos y fijos los cuales no se pueden modificar, y para esto debemos tomar un archivo y leerlo, después en nuestra función que imprime el Sudoku, cambiar los valores que tiene como 0 por X’s y para que nuestro código en C++ pueda leer el código, tuvimos que incluir al principio de nuestro código, la librería de igual manera utilizamos una librería especial que encontramos en internet, la cual nos permite imprimir valores, letras, números o caracteres en algún color que definimos de igual manera al principio del código, esta librería se llama . Lo que más raro y chistoso se nos hizo fue que no se nos ocurría como hacer una función que reiniciara el juego, pero después de quebrarnos tanto la cabeza, entendimos y se nos ocurrió dentro del INT MAIN que si el usuario pide “Reiniciar el juego” solo llamaríamos a la función INT MAIN para que vuelva a correr todo lo que ésta dentro de esta función. Dentro del INT MAIN fue donde cambiamos los parámetros para la función que checa los cuadrantes y finalmente si se cumplen las condiciones que están dentro de cada función que checa, el juego habrá terminado y el jugador habrá ganado el juego.

De igual manera dentro del INT MAIN es donde están cada una de las opciones que queremos para que el usuario pida para realizar una acción, al final si el usuario pide “Salir” lo que nuestro programa hará es terminar todas las otras funciones que estaba  haciendo y simplemente usamos un RETURN 0 para que ya no aparezca nada, simplemente dará las gracias por jugar y se saldrá de nuestro código.

Lo que más se nos hizo difícil fue encontrar las librerías para definir colores, además de pensar cómo hacer las funciones CHECAR y lo extenso del código para hacer un Sudoku es de lo que más se nos hizo difícil. Para solucionar todo esto recurrimos a Internet, amigos, pero principalmente en el libro dan muchas ideas y tipos de variables, funciones que nos permiten hacer que nuestro Sudoku corra de manera correcta y no nos marque errores (los cuales hubo muchísimos pero se solucionaron).

 

Es un proyecto muy padre porque engloba todo lo que ves en el semestre básicamente y lo principal es que es muy divertido y es muy interesante saber cómo por medio de código en un lenguaje determinado, la computadora lo interpreta y da como resultado algo que nosotros nos proponemos. Muy buen proyecto.

Aquí está el link con nuestro código en Github:

https://github.com/kenwbauer/LuisAngelFernando/blob/master/Sudoku%20Final

Y por ultimo aquí esta una imagen de nuestro Sudoku corriendo en una computadora.

 

Final Project’s Final Post

Hello, Everybody!!

This is my post about the Sudoku game.

 I found it  very difficult, at the beginning because we dont have idea how to do it , then we realize it as the days pass  and more things we learned in class that it wasn’t hard enough as we though.

I really enjoy work with  Gonzalo Mata what I liked most was the patience he had for me, because he teach me too many things that at that moment I didn’t understand, he  facilitated my learning so in that way I began to see the project differently and we started to work well, we  did our  best to move the project forward despite how busy we were in school, we find the way to solve any problem that we had.

 

Here is the code  Enjoy it:

https://github.com/kenwbauer/AleGonzalo/blob/master/sudoku.cpp

1017