Search Results

Search found 2390 results on 96 pages for 'morten green hermansen'.

Page 34/96 | < Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >

  • Java MVC - How to divide a done text game into MVC?

    - by Zopyrus
    Been sitting here for hours now trying to figure this out, so a bit sympathy for this large question. :) The Goal: I simply want to divide my done code into MVC (Model View Controller) parts. I have the game logics done and text based - the code works fine. The Problem: Well, I want to implement this code into MVC, but where do explain for the MODEL that it should use text-based? Because the VIEW is only for the layout (graphically) correct? I am having a REALLY hard time figuring out where to begin at all. Any pointers would be so nice! Here is my game logics code: import mind.*; import javax.swing.*; import java.util.*; import java.lang.*; import java.awt.*; public class Drive { String[] mellan; boolean gameEnd, checkempty, checkempty2, enemy, enemy2; String gr,rd,tom; int digits; public Drive() { // Gamepieces in textform gr="G"; rd="R"; tom=" "; mellan = new String[7]; String[] begin = {gr,gr,gr,tom,rd,rd,rd}; String[] end = {rd,rd,rd,tom,gr,gr,gr}; //input Scanner in = new Scanner(System.in); mellan=begin; gameEnd=false; while (gameEnd == false) { for(int i=0; i<mellan.length; i++) { System.out.print(mellan[i]); } System.out.print(" Choose 0-6: "); digits = in.nextInt(); move(); checkWin(); } } void move() { //BOOLEAN for gameruls!!! checkempty = digits<6 && mellan[digits+1]==tom; checkempty2 = digits>0 && mellan[digits-1]==tom; enemy = (mellan[digits]==gr && mellan[digits+1]==rd && mellan[digits+2]==tom); enemy2 = (mellan[digits]==rd && mellan[digits-1]==gr && mellan[digits-2]==tom); if(checkempty) { mellan[digits+1]=mellan[digits]; mellan[digits]=tom; } else if (checkempty2) { mellan[digits-1]=mellan[digits]; mellan[digits]=tom; } else if (enemy) { mellan[digits+2]=mellan[digits]; mellan[digits]=tom; } else if (enemy2) { mellan[digits-2]=mellan[digits]; mellan[digits]=tom; } } void checkWin() { String[] end = {rd,rd,rd,tom,gr,gr,gr}; for (int i=0; i<mellan.length; i++){ } if (Arrays.equals(mellan,end)) { for (int j=0; j<mellan.length; j++) { System.out.print(mellan[j]); } displayWin(); } } void displayWin() { gameEnd = true; System.out.println("\nNicely Done!"); return; } // Kör Drive! public static void main(String args[]) { new Drive(); } } Here is how I defined my DriveView thus far: (just trying to make one button to work) import mind.*; import javax.swing.*; import java.util.*; import java.lang.*; import java.awt.*; import java.awt.event.*; public class DriveView extends JFrame { JButton ruta1 = new JButton("Green"); JButton ruta2 = new JButton("Green"); JButton rutatom = new JButton(""); JButton ruta6 = new JButton("Red"); private DriveModel m_model; public DriveView(DriveModel model) { m_model = model; //Layout for View JPanel myPanel = new JPanel(); myPanel.setLayout(new FlowLayout()); myPanel.add(ruta1); myPanel.add(ruta2); myPanel.add(rutatom); myPanel.add(ruta6); this.setContentPane(myPanel); this.pack(); this.setTitle("Drive"); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); } void addMouseListener(ActionListener mol) { ruta2.addActionListener(mol); } } And DriveController which gives me error at compile import mind.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.lang.*; public class DriveController { private DriveModel m_model; private DriveView m_view; public DriveController(DriveModel model, DriveView view) { m_model = model; m_view = view; view.addMouseListener(new MouseListener()); } class MouseListener implements ActionListener { public void actionPerformed(ActionEvent e) { String mening; mening = e.getActionCommand(); if (mening.equals("Green")) { setForeground(Color.red); } } } }

    Read the article

  • Shinken - Anyone using it?

    - by Marco Ramos
    I've recently discovered Shinken, which a new implementation of Nagios using python. Shinken "divides" Nagios in 5 different types of agents, each one performing separated tasks. I haven't tried it yet but for what I've seen the whole architecture idea seems great to me (it works the Unix way: one process, one task), but the project seems a little "green" yet. So, has anyone tried Shinken? What's your opinion?

    Read the article

  • HP Proliant Servers - WMI query for system health

    - by Mike McClelland
    Hi, I want to query lots of HP servers to determine their overall health. I don't want to use any packages, or even SNMP - I want to query the server health from WMI and understand if a box is Green/Amber/Red - just like the HP Management Home Page. This MUST be possible - but I can't find any documentation... Oh yes, and the servers are running Windows Server 2003/8. Help!! Mike

    Read the article

  • good way of changing all pixels of one particular color to another particular color in a jpeg/png?

    - by gojira666
    I have an image which looks like this: http://img21.imageshack.us/i/64054053.jpg/ However the yellow line needs to be red and the cyan line needs to be green. I have MS Paint and IrfanView. How can I change the colors of the yellow and cyan line without individually selecting all pixels manually? I.e. what is a good way of changing all pixels of one color to another color?

    Read the article

  • NAS Performance issus

    - by Markus
    I have bougth a NAS from Conecptronic CH3MNAS and build in two Western Digital 1,5TB Green Drives. I only get a write speed of 6mb/s in LAN The configuration of the drives is as follows: - Raid 0 - EXT2 is that a normal speed?

    Read the article

  • Conditional Formatting of a Cell Based on Color Value in that Cell in Excel

    - by Otaku
    Is is possible to format a cell based on one component of the RGB value inside of it. For example, let's say I have 3 cells - A1, A2, A3. In A1, I want the cell color to be the shade of red anywhere between 0 and 255 of the number in the cell (so if it is 128, it should be like half red). For that given cell, the other values will just be 0, 0 (so in this case, zero green and zero blue). Is this possible?

    Read the article

  • rm -rf not erasing directory

    - by chief
    I am attempting to erase a directory called apps. When I run rm-rf apps it looks like it erases it for the moment. When I log back on to the server the directory is still there, though it is highlighted in green. drwxrwxrwx 3 user user 4096 2010-04-24 18:33 apps

    Read the article

  • rm -rf not erasing directory

    - by chief
    I am attempting to erase a directory called apps. When I run rm-rf apps it looks like it erases it for the moment. When I log back on to the server the directory is still there, though it is highlighted in green. drwxrwxrwx 3 user user 4096 2010-04-24 18:33 apps Ubuntu 9.10

    Read the article

  • Ubuntu 10.04 Lucid on IBM Thinkpad T41

    - by naugtur
    I tried to boot my T41 from a Ubuntu Lucid liveCD and it worried me. The white text on violet background had green pixels around it. After the splashscreen went away Ubuntu popped an alert that the installer had some errors and will now run live. The live system worked fine I guess... Did anybody experience such behaviour?

    Read the article

  • Changing terminal colors in Ubuntu Server

    - by Josh K
    I'd like to change the colors. The lime green hilighting on pale blue colored file names is killing my eyes. I'm not sure if I'm using xterm or gnome or whatever, but I would like to change the default color scheme (preferable to something less offensive to my corneas) and have it stay changed (update my user profile). Colors are nice, but sometimes it makes the text unreadable. I would settle for having no colors, standard B&W, if I can't have nice colors.

    Read the article

  • NAS Performance issues

    - by Markus
    I bought a NAS from Conceptronic CH3MNAS and built in two Western Digital 1,5TB Green Drives. I only get a write speed of 6mb/s in LAN The configuration of the drives is as follows: - Raid 0 - EXT2 Is that a normal speed?

    Read the article

  • Change dead disk in DPM 2010

    - by Dragouf
    I was backuping data on an 1Gb hard drive with DPM 2010. This disk died but I replace it with another 1Gb hard drive. But I don't find how to recreate data structure on this new drive from previous protection group. Protection group were red. I delete the disk in "administration disks", now protection group are green but they don't save data and I don't see any menu to change the disk destination. how to do ? thanks

    Read the article

  • Monitor occasionally doesn't display properly

    - by homestead
    Hi, I am using dual monitors, and this behavior has occured on 2 different computers (using the same monitors). When I turn the monitors off, and then on again after a while, 1 monitor turns on, displays the Dell logo etc. but doesn't display the windows login. It is just a blank page, and then the green light turns orange. Turning it on/off many times or just waiting a while eventually results in it working again, but I am very confused why!

    Read the article

  • Windows Mobile Device Center (6.1) not starting?

    - by Madhup
    Hi all, I am trying to start windows mobile device center on windows 7 machine. But it only shows me the small green window that is shown at loading time and then it is closed automatically. I am not getting what the problem is. I tried to uninstall the previous update then re-installed again but the problem is not gone. Guys please help me out. I need to debug my app and submit its build today. Thanks, Madhup

    Read the article

  • Can I customize the Summary Network Report in Windows Server 2008?

    - by Xavier
    Hi Guys, We get a weekly Summary Network Report from our SBS 2008 server, delivered by email. The report contains many alerts. We want to ignore some of them so that the report is all green and any alert will stand out. For example, we want to ignore the alert regarding the firewall being off on the server. Is there a place where I can select what points to check and the level of some alerts (such as low remaining disk space), etc?

    Read the article

  • Recovering files using Recuva

    - by Nev Meek
    I'm currently using Recuva to recover some files from an external NTFS disk. It finds the files I'm interested in during it's analysis phase (when tools like test-disk fail to find them at all) and reports them as "Not-deleted" and a big green marker to signify 100% chance of recovery. However when it tries to recover the files I get a "the system could not find the file specified" message. Is there any easy way to recover non-deleted files off of a disc that I can no longer simply access through explorer?

    Read the article

  • No video output and no status light on HP Proliant Microserver

    - by tombull89
    I have an issue with a "N40L" HP Proliant Microserver. When the server is powered on the power light turns green but the machine's status light (the HP logo on the front) stays off and there is no video output through th onboard VGA. The system fan kicks in and if connected to a network the link light shows activity. I have no extra boards (iLO card, graphics card) only 4GB PNY non-standard stick of RAM.

    Read the article

  • Problem with slow hard disk

    - by Makis Arvin
    We bought some new PCs in my company with the new iCore 7 and 8GB memory and the following hard disk: WESTERN DIGITAL WD8000AARS 800GB CAVIAR GREEN SATA2 The problem we have is that after installing windows XP64 SP2 the write speed of the hard disk is extremely low!. The windows system monitor shows that the Average Disk queue length is always at 100% and a winzip extract of 350mb takes about 8min. Is there any idea on where to start looking for the cause of that? Thanks

    Read the article

  • Visual Studio not auto-building when I press the debug button

    - by Kurru
    Hi I'm writing code in Visual Studio but whenever I want to test the application and press the green arrow for "Start debugging", Visual Studio does not automatically recompile the active solution for me and I have to manually build the solution then debug it. Visual Studio used to automatically build before debug and I want this back as contantly having to manually build is a serious pain. Thanks

    Read the article

  • How Do i configure sip2sip, sipdroid, pbxes, and google voice on my andriod g1

    - by Bliss
    I've been trying to configure the above for two days i used ipkall at first and it registered with my sipdroid app because i got a green status light and whenever i make a call from sipdroid it will show it in the pbxes call log but the call drops asap..i downloaded sip2sip to get another number ive gotten the new number from sip2sip now i need to configure sip2sip with sipdroid and google voice...can someone please help me my e-mail is [email protected]

    Read the article

  • "Must have" Windows Media Center add-ons?

    - by Will
    Where are they? I've seen and used a few, but most of them either look awful or behave badly. Are there any useful add-ons that you would recommend that work and integrate well into Windows Media Center? Yes, I could go to the green button and sift through hundreds of add-ons. I'm looking for the cream of the crop.

    Read the article

< Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >