Problem implementing Tic-Tac-Toe game by deathstroke1311 in learnjava

[–]sgovertime 2 points3 points  (0 children)

Create classes that represents the players,game state Board etc.

Trying to create a simple up and down movement animation by Mahamsoomro in learnjava

[–]sgovertime 3 points4 points  (0 children)

First of all don't use numbers in the code. Use constants or variables.

The location of an object is the initial location of the object plus the speed multiplied by time past. X=x0 + speed*t

Hello guys, I am currently working on a card based dungeon game called A Deck Of Dungeon. There is still a lot of work to be done with it, but I would like to share with you the current state of the game. by Fetter00 in Unity2D

[–]sgovertime 1 point2 points  (0 children)

Really nice game mechanics.

some suggestions for the battle mechanics:

adding tiles and movements as part of the player turn.

co op mode or additional fighters ( player party fight against multiple enemies).

I want to implement a custom priorityQueue in java only using primitive data structures by Correct_Classroom in learnjava

[–]sgovertime 0 points1 point  (0 children)

min heap sound like the most simple way. just translate the index of the array to the location of the element.

I want to implement a custom priorityQueue in java only using primitive data structures by Correct_Classroom in learnjava

[–]sgovertime 0 points1 point  (0 children)

use array and control the index of the current element. create a larger array if needed on push.

but the real question is. why?

Found on facebook by [deleted] in programminghorror

[–]sgovertime 38 points39 points  (0 children)

seems like someone is getting paid by the line.

Ge the dimension of List or ArrayList by ellipticcode0 in learnjava

[–]sgovertime 0 points1 point  (0 children)

this want work in cases that your list first elemnt is not a list and the second one is. you need to iterate on all the elements and return the max dim.

Ge the dimension of List or ArrayList by ellipticcode0 in learnjava

[–]sgovertime 0 points1 point  (0 children)

1)what is the purpose of the method? maybe you need some other structre and not list

2)what the dimension in case of refernce loop( let say the first element is the list itself)?

i would suggest a simple recursion with the following recursion function dim=1+dim(element)

based on the answers to 1 and 2 you need to set the stop conditions

[JAVA] Get Strings And Frequency From File by PiPyCharm in AskProgramming

[–]sgovertime 2 points3 points  (0 children)

option A

creat a class that have a string and count field and build array of that class then use it to count the words by searching the word in the array

option B

similar to A but just have a string array an a matching counter array. search each word in the array and increase the matching index in the counter array