Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 38 results for
boardgame
- Page 1
Image not appear
Programming
Software Development
14 Years Ago
by beshoyatef
…, rangeXY = false; private MyMouse myMouse; public
BoardGame
() { myMouse = new MyMouse(); addMouseListener(myMouse); …gif"}; private ImageIcon[] imageIcons;
BoardGame
b; public Pieces(
BoardGame
boardGame
) { b =
boardGame
; } @Override public void paintComponent…
Help! JApplet -> JFrames
Programming
Software Development
15 Years Ago
by anbuhikaru
…private int [] location; private JPanel entername; private JPanel
boardgame
; private CardLayout cards; private Image introtopsc; private Image …new MainPanel( ); chooseone = new Cha1Panel( ); choosetwo = new Cha2Panel( );
boardgame
= new
BoardGame
( ); winnpanel = new WinnPanel( ); c.add(entername, "Greeting"…
anthor problem in chessboard game
Programming
Software Development
14 Years Ago
by beshoyatef
…awt.event.MouseEvent; import javax.swing.JPanel; public class
BoardGame
extends JPanel { private final int ROW = 8, …boolean flage = false, affectColor = false; private MyMouse myMouse; public
BoardGame
() { myMouse = new MyMouse(); addMouseListener(myMouse); addMouseMotionListener(myMouse); }…
Re: Image not appear
Programming
Software Development
14 Years Ago
by beshoyatef
So it is the best to put intializing method in calss
BoardGame
and delete this [CODE] pieces = new Pieces(board); board.add(pieces);[/CODE] from MovePawnTest class if you mean thing or you can adjust this problem by putting intializeingIcons() in class pieces see us how you will do this ?? Thanks ---------------------
The rows not appear in chess board game
Programming
Software Development
14 Years Ago
by beshoyatef
…] import java.awt.Graphics; import javax.swing.JPanel; public class
BoardGame
extends JPanel { private final int ROW = 8, COL = 8, x… = 100, y = 60; private int[][] board; public
BoardGame
() { board = new int[ROW][COL]; } @Override public void paintComponent(Graphics…
Re: anthor problem in chessboard game
Programming
Software Development
14 Years Ago
by beshoyatef
…awt.event.MouseEvent; import javax.swing.JPanel; public class
BoardGame
extends JPanel { private final int ROW = 8, …false, rangeXY = false, boardColor = false; private MyMouse myMouse; public
BoardGame
() { myMouse = new MyMouse(); addMouseListener(myMouse); addMouseMotionListener(myMouse); } @Override…
Re: anthor problem in chessboard game
Programming
Software Development
14 Years Ago
by beshoyatef
…awt.event.MouseEvent; import javax.swing.JPanel; public class
BoardGame
extends JPanel { private final int ROW = 8, …false, rangeXY = false, boardColor = false; private MyMouse myMouse; public
BoardGame
() { myMouse = new MyMouse(); addMouseListener(myMouse); addMouseMotionListener(myMouse); } @Override…
Re: anthor problem in chessboard game
Programming
Software Development
14 Years Ago
by beshoyatef
…awt.event.MouseEvent; import javax.swing.JPanel; public class
BoardGame
extends JPanel { private final int ROW = 8, …false, rangeXY = false, boardColor = false; private MyMouse myMouse; public
BoardGame
() { myMouse = new MyMouse(); addMouseListener(myMouse); addMouseMotionListener(myMouse); } @Override…
TicTacToe with MVC pattern
Programming
Software Development
11 Years Ago
by nixufix
…logics import javax.swing.JLabel; public class TicTacToe implements
Boardgame
{ int counter; JLabel spelare; public boolean move…quot;) class ViewControl extends JFrame implements ActionListener { //private
Boardgame
game; //private int size; private Square[][] board; …
tk inter minesweeper reset/newgame function
Programming
Software Development
14 Years Ago
by G33KKitty
… as tk import tkMessageBox from Tkinter import * import sys class
BoardGame
: under_vals = [ '0', '1', '1', '0', '1', '0', '1', '0',…quot;BOMB- Try Again?"): return newGame() else: quit() tc =
BoardGame
() tc.displayBoard() tc.enterMainLoop()[/CODE]
Re: tk inter minesweeper reset/newgame function
Programming
Software Development
14 Years Ago
by JasonHippy
… as tk import tkMessageBox from Tkinter import * import sys class
BoardGame
: under_vals = [ '0', '1', '1', '0', '1', '0', … Again?"): self.newGame() else: quit() tc =
BoardGame
() tc.displayBoard() tc.enterMainLoop() [/CODE] Cheers for now, …
Re: tk inter minesweeper reset/newgame function
Programming
Software Development
14 Years Ago
by JasonHippy
…="#FFCC00", text="?") # main game class class
BoardGame
: under_vals = [ '0', '1', '1', '0', '1', '0', '1', '0… self.displayBoard(); def enterMainLoop(self): self.win.mainloop() tc =
BoardGame
() tc.displayBoard() tc.enterMainLoop() [/CODE] if you wanted to …
Help analyze my beta
Programming
Software Development
17 Years Ago
by Matt Tacular
…'ve been writing a text based version of the risk
boardgame
for my grade 12 programming isu(i plan for it…
Ever played Diplomacy?
Community Center
Geeks' Lounge
14 Years Ago
by lllllIllIlllI
Its a great
boardgame
, i am sure some of you are familiar with. I found a great site to play it online if 7 of us want to go for a game :) [url]http://www.worldleadersthegame.com[/url]
Question on using enum in class, C++
Programming
Software Development
7 Years Ago
by Nathan_6
…. I am trying to develop a class for a RISK
boardgame
, and I used UNIT_COLOR and UNIT_TYPE enums to represent the…
Re: fun, but hard work
Programming
Software Development
15 Years Ago
by n1337
… again... You can declare an integer array to simulate the
boardgame
"tiles": int board[100]; Then, you can initialize…
Re: Image not appear
Programming
Software Development
14 Years Ago
by beshoyatef
please any one guide me
Re: Image not appear
Programming
Software Development
14 Years Ago
by moutanna
Hi let s focus on your intializeingIcons funtion; let say s0 and s defined as follow String s0=imageNames[0]; URL s=getClass().getResource(s0); after too instructions s have a null value. that is the source of the bug. maybe the file you reffered to does not exist or it is not known.
Re: Help! JApplet -> JFrames
Programming
Software Development
15 Years Ago
by javaAddict
Declare the variables in the class, instantiate them in the constructor. Read about JFrames. Also I put in the constructor the code that generates the gui. Then call the class from a main method
Re: Help! JApplet -> JFrames
Programming
Software Development
15 Years Ago
by jwenting
when a class reaches 100 lines of code you should hear alarm bells going off in your head. It's getting way too large, too complex, and probably has way too many responsibilities.
Re: anthor problem in chessboard game
Programming
Software Development
14 Years Ago
by peter_budo
You need to provide logic or better method that on press [LIST] [*]reads mouse coordinates [*]finds out in which square of the board the coordinates are located [*]either return you X,Y coordinates of top left corner of the square for further processing or directly use these coordinates to change colour of the square [/LIST] Also would be …
Re: anthor problem in chessboard game
Programming
Software Development
14 Years Ago
by beshoyatef
[QUOTE=peter_budo;1014043]You need to provide logic or better method that on press [LIST] [*]reads mouse coordinates [*]finds out in which square of the board the coordinates are located [*]either return you X,Y coordinates of top left corner of the square for further processing or directly use these coordinates to change colour of the square…
Re: anthor problem in chessboard game
Programming
Software Development
14 Years Ago
by beshoyatef
please any one answer me
Re: anthor problem in chessboard game
Programming
Software Development
14 Years Ago
by peter_budo
[QUOTE=beshoyatef;1014103]please any one answer me[/QUOTE] [LIST=1] [*]This is not 24/7 "JUST ME!" service [*]I actually tried your code so I seen what is happening and based on that I provided recommendations [*]On mouse press/release you calling repaint() method that doesn't seems to "work the magic". Rethink the process …
Re: anthor problem in chessboard game
Programming
Software Development
14 Years Ago
by beshoyatef
[QUOTE=peter_budo;1014110][LIST=1] [*]This is not 24/7 "JUST ME!" service [*]I actually tried your code so I seen what is happening and based on that I provided recommendations [*]On mouse press/release you calling repaint() method that doesn't seems to "work the magic". Rethink the process and do not forget to apply what I …
Re: anthor problem in chessboard game
Programming
Software Development
14 Years Ago
by Jocamps
[QUOTE=beshoyatef;1014370]i do this : " download my code from this : [URL="http://www.4shared.com/file/140858938/8cf47f25/_2__MovePawn.html"]http://www.4shared.com/file/140858938/8cf47f25/_2__MovePawn.html[/URL] I try but i can't . please illustrate your answer with code thanks[/QUOTE] show us what you tried and we'll …
Re: anthor problem in chessboard game
Programming
Software Development
14 Years Ago
by peter_budo
I'm not worried about blue selection box, which is obviously problem of your logic on the line 83-84 and can be quickly solved. What is bad is that I cannot figure out why the black & white square appear bellow the frame and then disappear of the frame (count on the X and Y coordinates is somehow messed up and they continue increment to …
Re: The rows not appear in chess board game
Programming
Software Development
14 Years Ago
by peter_budo
Because you told your program to draw only vertical lines and did not told it to draw horizontal. Configure this correctly and you get also horizontal lines [code=Java] g.drawLine((x * j) + 100, (y * i) + 60, (x * j) + 100, y * 8); g.drawLine(100, (y * i) + 60, 1000,(y * i) + 60);[/code]
Re: The rows not appear in chess board game
Programming
Software Development
14 Years Ago
by beshoyatef
[QUOTE=peter_budo;1012304]Because you told your program to draw only vertical lines and did not told it to draw horizontal. Configure this correctly and you get also horizontal lines [code=Java] g.drawLine((x * j) + 100, (y * i) + 60, (x * j) + 100, y * 8); g.drawLine(100, (y * i) + 60, 1000,(y * i) + 60);[/code][/QUOTE] Thanks for reply ..
Re: tk inter minesweeper reset/newgame function
Programming
Software Development
14 Years Ago
by G33KKitty
thats perfect thankyou so much! Would you be able to help me work out how to instead of displaying "ok" when there is no bomb, but to display how many bombs are nearby? and how to right click to signify you think there is a bomb? This code has been doing my head in for ages!!! kitty
1
2
Next
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC